Multiple Choice Question

Quiz Guidelines



Given that TestClass is a class, how many objects and reference variables are created by the following code?

TestClass t1, t2, t3, t4;
t1 = t2 = new TestClass();
t3 = new TestClass();

Select 1 option

A. 2 objects, 3 references.
B. 2 objects, 4 references.
C. 3 objects, 2 references.
D. 2 objects, 2 references.
E. None of the above

Q&A Set: