Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners What is the purpose of declaring a variable as final?
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Java Coder
What is the purpose of declaring a variable as final?
1 Answer(s)      a year and 8 months ago
Posted in : Java Beginners


Hi,

What is the purpose of declaring a variable as final?

Thanks


Advertisement
View Answers

April 11, 2013 at 1:44 PM


Hi,

In Java when we declare a final variable as a variable which has been initialized to a fixed value which cannot be changed after initialization. Once a variable declare/create as final its value never changed.

For more Details: http://www.roseindia.net/java/jdk7/variables.shtml

thanks,



Related Tutorials/Questions & Answers:
Advertisements
 

 

 

DMCA.com