Multiple choice

Which of the following statement(s) is/are true in java?

  1. An interface can not have static method in java.

  2. We can declare abstract class without any abstract method in java.

  3. If we declare main method as private in java then the program will compile.

  4. All of the above.

  5. Only (1) and (3) are true.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Yes, all of the above are the true statements in java.