Multiple choice technology programming languages

final and static access specifiers can be used for all kinds of variables

  1. True

  2. False

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

The statement is false because 'final' and 'static' are NOT access specifiers - they are modifiers. Access specifiers in Java are public, private, protected, and default (package-private). Additionally, 'static' cannot be used for local variables, and 'final' has different semantics depending on context.

AI explanation

final and static cannot be applied to all kinds of variables in Java — for example, local variables can be final but not meaningfully static (static applies at the class level, and local variables don't have class-level scope), and certain combinations are restricted by the language. Hence the statement is false.