πŸ“Š JAVA
Q. What will be the output of the following Java program?
final class A
{
int i;
}
class B extends A
{
int j;
System.out.println(j + " " + i);
}
class inheritance
{
public static void main(String args[])
{
B obj = new B();
obj.display();
}
}
  • (A) 2 2
  • (B) 3 3
  • (C) Runtime Error
  • (D) Compilation Error
πŸ’¬ Discuss
βœ… Correct Answer: (D) Compilation Error

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
94
Total Visits
πŸ“½οΈ
12 mo ago
Published
πŸŽ–οΈ
Ravi Shankar
Publisher
πŸ“ˆ
96%
Success Rate