Invoking a method by passing the object of a class is known as call by reference.
Explanation:
-
Call by Reference: When you pass an object to a method, you are passing a reference to that object, not a copy of the object itself. Thus, changes made to the object inside the method affect the original object.
-
Call by Value: This means passing a copy of the value of the variable. In Java, primitive types are passed by value, but objects are passed by reference.
Correct Answer:
b) Call by reference