Java | Class and Object | Question 4
Predict the output of following Java program.
a = 1 b = 2
(B) Compilation error
b = 2 a = 1
Members of inner class ‘demo’ can not be used in the outer class ‘Test’. Thus, get() of outer class can not access variable ‘b’ of inner class.
Quiz of this Question