Given a variable A that contains a reference to an object of type MyClass, which
ID: 3527626 • Letter: G
Question
Given a variable A that contains a reference to an object of type MyClass, which of the following best describes the effect of the code below? MyClass B = A; It sets an existing variable B to contain a refrence to the same object as A It sets an existing variable A to contain a refrence to the same object as B It creates and initialises a variable A to contain a reference to the same object as B It creates and initialises a variable B to contain a reference to the same object as A It returns true if A and A refer to the same object. What I think:D because MyClass B = A is just like StringB = AExplanation / Answer
D It coreates and initialises a vriable B to contain a reference to the same object as A
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.