Multiple choice

Which of the following is not a true statement?

  1. We can overload the main method in java.

  2. We can override the static method in java.

  3. Constructors can be overloaded in java.

  4. The return type is same in method overriding.

  5. None of the above

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

We cannot override the static method in java because the derived class method hides the functionality of base class method and there is no runtime polymorphism.