Single Choice
Not Set
QDetermine output:
public class Test{
public static void main(String args[]){
MyClass obj = new MyClass();
obj.val = 1;
obj.call(obj);
System.out.println(obj.val);
}
}
class MyClass{
public int val;
public void call(MyClass ref){
ref.val++;
}
}
ID: #2188
Java Constructor and Methods
820 views
Question Info
#2188Q ID
Not SetDifficulty
Java Constructor and MethodsTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
2
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic