Computer Science, asked by OoINTROVERToO, 1 month ago

 \huge\blue {\underline { \overline{ \bf  \mid\:  \:  \:  \: \: QUESTION  \: \:  \: \:  \mid}}}


What Is The Purpose Of Declaring A Variable As Final?

Answers

Answered by priyadarshinianjali1
3

Answer:

In Java when a variable is declared as final; the variable is initialized into a fixed value which cannot be altered after initialization. Once a variable created as final; its value can never change.In java it is mandatory to declare a variable before using it in a program.

Answered by OoExtrovertoO
0

A final variable's value can't be changed.

Final variables should be initialized before using them.

Similar questions