programming languages Online Quiz - 20

Casual Mode - Take your time!

1 / 20
Correct
0
Incorrect
0
Score
0%
Multiple Choice

public class test08 { public static void main(String[] args) { try{ A a = new B(); a.show(); }catch (Exception e){ } } }class A{ void show() throws FileNotFoundException{ System.out.println("This is the super class"); }}class B extends A{ void show() throws Exception{ System.out.println("This is the inherited class"); }}What will be the output?

  1. This is the super class
  2. This is the inherited class
  3. Compile time error
  4. Run time exception
Change Mode