Multiple choice technology programming languages

A method in a class declared as static can only access static class members.

  1. True

  2. False

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

Static methods can only directly access other static members of the class. They cannot access instance variables or instance methods because these require an object instance to exist. This is why static methods are often used for utility functions that don't depend on object state.