Which identifier is correctly named according to Java standards for a constant…

2025

Which identifier is correctly named according to Java standards for a constant variable?

  1. A.

    final_value

  2. B.

    FINAL_VALUE

  3. C.

    FinalValue

  4. D.

    finalValue

Attempted by 58 students.

Show answer & explanation

Correct answer: B

Java constants follow the UPPER_SNAKE_CASE naming convention. This means all letters should be uppercase and words separated by underscores, like FINAL_VALUE.

Explore the full course: Rssb Senior Computer Instructor