Bird
0
0

Which statement about static methods in Java is true?

easy📝 Conceptual Q11 of 15
Java - Static Keyword
Which statement about static methods in Java is true?
AStatic methods belong to the class and can be called without creating an object.
BStatic methods can only be called on objects of the class.
CStatic methods can access instance variables directly.
DStatic methods must always return void.
Step-by-Step Solution
Solution:
  1. Step 1: Understand what static means

    Static methods belong to the class itself, not to any object instance.
  2. Step 2: Check method calling rules

    Static methods can be called using the class name without creating an object.
  3. Final Answer:

    Static methods belong to the class and can be called without creating an object. -> Option A
  4. Quick Check:

    Static method = class method call [OK]
Quick Trick: Static methods use class name, no object needed [OK]
Common Mistakes:
  • Thinking static methods need an object to call
  • Assuming static methods access instance variables
  • Believing static methods must return void

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Java Quizzes