Why Temporary Object Is Not Created In Return By Reference #1139
Why temporary object is not created in return by reference?
This multiple choice question (MCQ) is related to the book/course
gs gs111 OOP Object Oriented Programming Java.
It can also be found in
gs gs111 Assigning Object, Pointer to Objects, Passing and Returning Object - OOPs MCQ: Returning Objects - Quiz No.2.
Why temporary object is not created in return by reference?
Because compiler can’t create temporary objects
Because the temporary object is created within the function
Because return by reference just make the objects points to values memory location
Because return by reference just make the object point to null