Solved

Suppose You Have a Class Named Employee with a Name

Question 42

Multiple Choice

Suppose you have a class named Employee with a name property and a standard setName method. What is the situation after the following code executes?
Var emp1 = new Employee("Emme") ;
Var emp2 = emp1;
Emp2.setName("Jessie") ;


A) For their name properties, emp1 stores "Emme" and emp2 stores "Jessie".
B) For their name properties, both emp1 and emp2 store "Emme".
C) For their name properties, both emp1 and emp2 store "Jessie".
D) Both emp1 and emp2 store null.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions