Computer Science, asked by baldevkamboj6385, 11 months ago

What is the output of this program? Class a { public int i; protected int j; } class b extends a { int j; void display() { super.J = 3; system.Out.Println(i + " " + j); } } class output { public static void main(string args[]) { b obj = new b(); obj.I = 1; obj.J = 2; obj.Display(); } }?

Answers

Answered by xtylishbabu
0

Answer:

A class member declared protected becomes a member of subclass of which ... What will be the output of the following Java program? ... class B extends A; {; int j;; void display(); {; System.out.println(j);; } ... public static void main(String args[]) ... int i;; }; class B extends A; {; int j;; void display(); {; super.i = j + 1;

Explanation:

Similar questions