Computer Science, asked by thisisut1905, 1 year ago

What will be the output of the following Java program?

abstract class A

{

int i;

abstract void display();

}

class B extends A

{

int j;

void display()

{

System.out.println(j);

}

}

classAbstract_demo

{

public static void main(String args[])

{

B obj = new B();

obj.j=2;

obj.display();

}

}


Select one:
A. Compile time error
B. 0
C. Runtime error
D. 2

Answers

Answered by kaurmohinder452
9

Answer:

2.441

uhduduebdjiekwod fjejdido for book boo k vocab

Similar questions