Multiple choice technology programming languages

Are static methods allowed to access instance variables using "this"

  1. No

  2. Yes

  3. Can be in special cases

  4. None

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

Static methods belong to the class rather than any specific object instance. Consequently, they do not have access to an instance context and cannot use the this keyword. Attempting to use this inside a static method results in a compile-time error, making 'No' the only correct option.