1.

How many objects can be referenced from the same variables?(a) One at a time(b) Many at a time(c) Many using array name(d) 7 at max at same timeI had been asked this question in unit test.I want to ask this question from Object Reference topic in chapter Object of Object Oriented Programming

Answer»

Right CHOICE is (a) One at a time

For EXPLANATION: There should not be any CONFUSION in how many references can be made from a single variable. A single variable can only point to one object at a time. EVEN if it’s an ARRAY, the name of the array is used and is considered one object name only (representing first array element).



Discussion

No Comment Found

Related InterviewSolutions