Multiple choice

In Java, final keyword gives the same result as ________ declaration in C++.

  1. throw

  2. cout

  3. const

  4. cin

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The final keyword declares the variable as a constant. The final variable has to be initialized only once. The same process is done in C++ by the keyword const.