Question: 6. What does this program print? package javaapplication30; public class A f public int i; 1 package javaapplication30; public class B extends A { public

 6. What does this program print? package javaapplication30; public class A

6. What does this program print? package javaapplication30; public class A f public int i; 1 package javaapplication30; public class B extends A \{ public int i; public B(int a, int b) \{ super.i=a; // not allowed to change i=b;// not allowed to change 3 public void show0 System.out.println("i in superclass: " + super.i); // not allowed to change System.out.println("i in subclass: " + .i); // not allowed to change 33 package javaapplication 30 public class JavaApplication30 \& public static void main(String args) \{ B sub Ob= new B(1,2) sub0b.show 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!