Single Choice
Easy
QInvoking a method by passing the object of a class is known as
ID: #22235
switch case in Java
122 views
Question Info
#22235Q ID
EasyDifficulty
switch case in JavaTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
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
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic