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?

  1. AA variable stores fixed data throughout program execution, while a constant's value may change dynamically.
  2. BBoth constants and variables can be modified freely within the same class.
  3. CConstants are automatically public and static in all contexts.
  4. 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.

From BEL PE Computer Science PYQ, 20 Dec 2025 (5:00 PM)

This is question 71 of BEL PE Computer Science PYQ, 20 Dec 2025 (5:00 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.