Question 71Asked in BEL PE Computer Science, 20 Dec 2025 (5:00 PM)Which of the following correctly distinguishes a constant from a variable in Object-Oriented Programming using Java semantics?
- AA variable stores fixed data throughout program execution, while a constant's value may change dynamically.
- BBoth constants and variables can be modified freely within the same class.
- CConstants are automatically public and static in all contexts.
- DA constant is declared using the final keyword, ensuring its value cannot be altered once initialised.
Show answerHide answer
Correct answer: (D) A constant is declared using the final keyword, ensuring its value cannot be altered once initialised.