What will be the output of the following code? abstract class X { int b; abstract void print(); } class Y extends X { int a; void print() { System.out.println(a); } } class Test_Questions { public...


What will be the output of the following code?
abstract class X
{
int b;
abstract void print();
}
class Y extends X
{
int a;
void print()
{
System.out.println(a);
}
}
class Test_Questions {
public static void main(String args[])
{
X obj = new Y();
obj.b = 6;
obj.print();
}
}




Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here