Java Programming Language MCQ Java Constructor and Methods
⚠ Report ✓ Question Verified Copy Link
class Person{ public int number; } public class Test{ public void doIt(int i , Person p){ i = 5; p.number = 8; } public static void main(String args[]){ int x = 0; Person p = new Person(); new Test().doIt(x, p); System.out.println(x + " " + p.number); } }What is the result?
Learn More MCQ Questions from Java Programming Language MCQ Java Constructor and Methods