+ 3
When we use final variables?what is the purpose?
6 Answers
+ 6
In Java you declare a variable final to prevent it from being modified... If you do not want your variable to ever be changed you declare it final and that way you make it a constant.
+ 2
Sure! Look at this code and read the comments. Let me know if you need more explaining âș
https://code.sololearn.com/calOxXDS1Q6T/?ref=app
+ 1
thnx
0
can u explain with examples.
0
great.
0
if you use final keywords to create a variable
it means u can't change the value of that variable