Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Type the program's output public class Person { private String firstName; private String lastName; public void setFirstName (String firstNameToSet) { firstName = firstName To Set;
Type the program's output
public class Person { private String firstName; private String lastName; public void setFirstName (String firstNameToSet) { firstName = firstName To Set; ; } public void setLastName (String lastNameToSet) { lastName = lastName To Set; } public String getFullName () { return firstName + "-" + lastName; } } public class CallPerson { public static void main(String [] args) { String aFirstName; String anotherFirstName; String aLastName; String anotherLastName; aFirstName = "Sue"; anotherFirstName = "Bob"; aLastName = "Stark"; anotherLastName = "Parker"; " Person personl Person person2 = new Person(); new Person(); personl.setLastName (aLastName); person2.setLastName (anotherLastName); personl.setFirstName (aFirstName); person2.setFirstName (anotherFirstName); System.out.println("You are " + person1.getFullName () ); System.out.println("I am + person2.getFullName ()); TV } }Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started