Java and Object-Oriented Programming Quiz

Casual Mode - Take your time!

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

You have the following code in a file called Test.java class Base{ public static void main(String[] args){ System.out.println("Hello"); } } public class Test extends Base{} What will happen if you try to compile and run this?

  1. It will fail to compile.
  2. Runtime error
  3. Compiles and runs with no output.
  4. Compiles and runs printing "Hello"
Change Mode