Online Hibernate Training just in Rs. 1000

One week online training in Hibernate ORM framework. Learn Hibernate Framework and enhance your skills. Best Online Hibernate training at 90% discount. Join Now!! Offer is valid Only for limited Period!!! Online Training Big Data and Hadoop Training Java Training  
 

What is the purpose of declaring a variable as final?

Ads

 
 

Share on Google+Share on Google+

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

Hi,

What is the purpose of declaring a variable as final?

Thanks

Ads
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,


Ads









Related Tutorials/Questions & Answers:
Advertisements