public class One { public One() { x = 1; y = 2; } public void display() { System.out.println((x + 1) + " " + (y + 1)); } private int x; private int y; } public class Two { public static void main(String[] args) { One obj = new One(2, 4); obj.display(); } }
Select the most appropriate answer.