Java Programming Language MCQ Java Constructor and Methods
⚠ Report ✓ Question Verified Copy Link
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++; } }
Learn More MCQ Questions from Java Programming Language MCQ Java Constructor and Methods