Question PRG-JAVA-0023
EasyWhich keyword makes a Java variable a constant that cannot be reassigned?
- A.
final
- B.
const
- C.
Show answer and explanation
Answer: A
const is reserved in Java but not used; final is the keyword for constants.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Java question
Which keyword makes a Java variable a constant that cannot be reassigned?
final
const
Answer: A
const is reserved in Java but not used; final is the keyword for constants.
constant
static