Multiple choice technology programming languages

Select three correct statements.

  1. A static method may override another static method

  2. A static method cannot override a non-static method

  3. A non-static method cannot override a static method

  4. A non-static method may be overloaded by a static method

  5. A synchronized method cannot be overridden

Reveal answer Fill a bubble to check yourself
B,C,D Correct answer
Explanation

In Java, static methods cannot be overridden (only hidden), meaning a static method cannot override a non-static method, and vice versa. However, overloading allows methods with the same name but different signatures, regardless of static modifiers. Synchronized methods can be overridden freely.