1. What will be the Output of the following code? class X{ static int x = 1; static class Y { static int y = x++; static class Z { static int z = ++y; } } } class MainClass{ public static void main(String[] rk) { System.out.print(X.x); System.out.print(X.Y.y); System.out.print(X.Y.Z.z); } } A. 113 B. 123 C. 111 D. None of These Ans: A 2. Which of the following statement is TRUE about t he following code? public class Outer { private i
Comments
Post a Comment