Question 44 Which of the statement given in options is false?
Qualcomm technical mcq question, verified with a worked answer. Free to practise - no sign-up.
Question 44
Which of the statement given in options is false?
Show answer & explanation
Static variables are not required to be initialized at declaration—they receive default values (0, null, false, etc.) if not explicitly initialized. Options B and D are true (final variables must be initialized and cannot be reinitialized), and Option C is true (static variables can be reassigned). Therefore, Option A is the false statement.
Step-by-step Derivation:
Evaluate each statement:
A) FALSE — Static variables in Java are automatically initialized to default values (0 for numbers, null for objects, false for booleans) if not explicitly initialized. Initialization is optional.
B) TRUE — Final variables must be initialized either at declaration or in the constructor (for instance finals). They cannot be left uninitialized.
C) TRUE — Static variables can be reassigned/reinitialized multiple times during program execution (they are mutable unless also declared final).
D) TRUE — Final variables cannot be reinitialized; once assigned, their value is immutable.
Since the question asks for the false statement, the answer is A.