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
9
Answer:
uhduduebdjiekwod fjejdido for book boo k vocab
Similar questions
History,
6 months ago
Hindi,
6 months ago
Social Sciences,
1 year ago
English,
1 year ago
English,
1 year ago
Computer Science,
1 year ago
Hindi,
1 year ago