Question: Please explain why the output is Kitty and Joseph. THis is JAVA program. (c) What is the output of the following program segment? String name1

Please explain why the output is Kitty and Joseph.
THis is JAVA program.
(c) What is the output of the following program segment? String name1 "Kitty"; String name2 = name1; Employee employeeA = new Employee(name2); Employee employeeB employeeA; name1 = "Joseph"; employeeB.setName(namel); System.out.println(name2 + + employeeA.getName()); = 11
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
