1.

If an object is passed by value _____________(a) A new copy of object is created implicitly(b) The object itself is used(c) Address of the object is passed(d) A new object is created with new random valuesThe question was asked in unit test.The above asked question is from Passing and Returning Object with Functions in section Object of Object Oriented Programming

Answer»

Right answer is (a) A NEW copy of object is CREATED IMPLICITLY

The explanation is: When an object is PASSED by value, a new object is created implicitly. This new object uses the implicit values assignment, same as that of the object being passed.



Discussion

No Comment Found

Related InterviewSolutions