Question: What is the output of this code? class A { protected int i; private int j; } class B extends A{ public B(){ }
What is the output of this code? class A { protected int i; private int j; } class B extends A{ public B(){ } super.j = super.i + 1; } private void someMethod () { System.out.println(super.i+""+ super.j); } Bb= new B(); b.someMethod ();
Step by Step Solution
3.39 Rating (146 Votes )
There are 3 Steps involved in it
The given code is not written correctly and contains syntax erro... View full answer
Get step-by-step solutions from verified subject matter experts
