Question: public class A { int no; public void display ( ) { System.out.println ( the number in A + no ) ; } public void

"public class A
{
int no;
public void display()
{
System.out.println(the number in A +no);
}
public void computeSquare()
{
no = no * no;
}
}
public class B extends A
{
int no;
public B(int n1, int n2)
{
super(n1) TN11 ;
no = n2* n1;
}
public void display()
{
super.display();
System.out.println(the number in B +no);
}
public void computeCube()
{
no = no * no * no;
}
}
public class AB
{
public static void main(String[] args)
{
int n=10;
AB b = new AB(n, n*2);
b.display();
b.computeSquare();
b.computeCube();
}
}
Ans
The out put?"

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 Programming Questions!