1 Answer(s)      6 years and 3 months ago
Posted in : Java Beginners

what is the difference between final and constant


View Answers

December 21, 2010 at 5:46 PM

Hi Friend,


1) In final keyword the value of variable remain constant throughout the execution of program. And constant also remains unchanged but we can inherit the constant variable.

2) Final can be used with variable, methods or class, and we use constant with variables

3) Constant value is identified when program is running whereas final value may or may not be recognized at runtime.


Related Tutorials/Questions & Answers:
JAVA N HTML - JavaMail
JAVA N HTML  How to use HTML's mailto tag in a java application.. please give me reply as soon as possible.. i've to submit my project on coming monday... Please Help Me.. Thanks Vamsi Krishna  Hi Friend