OOPS
August 29, 2024OOPS
August 29, 2024OOPS
Question 164 |
When one object reference variable is assigned to another object reference variable then
a copy of the object is created. | |
a copy of the reference is created. | |
a copy of the reference is not created. | |
it is illegal to assign one object reference variable to another object reference variable. |
Question 164 Explanation:
• A reference variable is an alias, that is, another name for an already existing variable. Once a reference is initialized with a variable, either the variable name or the reference name may be used to refer to the variable.
• A reference variable must be initialized at the time of declaration.
Correct Answer: B
Question 164 Explanation:
• A reference variable is an alias, that is, another name for an already existing variable. Once a reference is initialized with a variable, either the variable name or the reference name may be used to refer to the variable.
• A reference variable must be initialized at the time of declaration.