Answered step by step
Verified Expert Solution
Link Copied!

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;

image text in transcribedimage text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions

Question

5. What information would the team members need?

Answered: 1 week ago