Which of the following statements about statically typed languages is true?
2025
Which of the following statements about statically typed languages is true?
- A.
Types are associated with values, not variables
- B.
Variable types can change during execution
- C.
Type checking is done at runtime
- D.
Type errors are caught during compilation
Attempted by 65 students.
Show answer & explanation
Correct answer: D
Statically typed languages require variable types to be declared at compile time. This allows for early error detection and better performance optimization compared to dynamically typed languages.