Multiple choice technology programming languages

A static method can refer to any instance variable of the class.

  1. True

  2. False

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

Static methods belong to the class itself, not to any instance. They cannot access instance variables because instance variables exist only when an object is created. Static methods can only access other static members (static variables and static methods). This is a fundamental distinction between static and instance members in Java.