Beginner Java
Q34 / 100

How do you declare a constant in Java?

Correct! Well done.

Incorrect.

The correct answer is B) static final int MAX = 10;

B

Correct Answer

static final int MAX = 10;

Explanation

Java uses static final (by convention in ALL_CAPS) to declare constants. const is a reserved word but not used.

Progress
34/100