Bird
0
0

Which statement about static methods in Java interfaces is true?

easy📝 Conceptual Q1 of 15
Java - Interfaces
Which statement about static methods in Java interfaces is true?
AStatic methods in interfaces must be overridden by implementing classes.
BStatic methods in interfaces can be called without an instance.
CStatic methods in interfaces cannot have a body.
DStatic methods in interfaces are inherited by subclasses.
Step-by-Step Solution
Solution:
  1. Step 1: Understand static methods in interfaces

    Static methods belong to the interface itself, not to instances or subclasses.
  2. Step 2: Analyze method call behavior

    They can be called using the interface name directly, without creating an object.
  3. Final Answer:

    Static methods in interfaces can be called without an instance. -> Option B
  4. Quick Check:

    Static method call = without instance [OK]
Quick Trick: Call static interface methods using InterfaceName.method() [OK]
Common Mistakes:
  • Thinking static methods must be overridden
  • Assuming static methods are inherited
  • Believing static methods cannot have bodies

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Java Quizzes