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  

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

1 Expert Approved Answer
Step: 1 Unlock

The given code is not written correctly and contains syntax erro... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!