vamsi

vamsi

what is the difference between final and constant

View Answers

December 21, 2010 at 5:46 PM

Hi Friend,

Differences:

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.

Thanks









Related Tutorials/Questions & Answers:
vamsi
ModuleNotFoundError: No module named 'arith-vamsi'
ModuleNotFoundError: No module named 'arith-vamsi'  Hi, My Python... 'arith-vamsi' How to remove the ModuleNotFoundError: No module named 'arith-vamsi' error? Thanks   Hi, In your python environment
Advertisements
ModuleNotFoundError: No module named 'arith-vamsi'
ModuleNotFoundError: No module named 'arith-vamsi'  Hi, My Python... 'arith-vamsi' How to remove the ModuleNotFoundError: No module named 'arith-vamsi' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'example-pkg-vamsi'
ModuleNotFoundError: No module named 'example-pkg-vamsi'  Hi, My... named 'example-pkg-vamsi' How to remove the ModuleNotFoundError: No module named 'example-pkg-vamsi' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'example-pkg-vamsi'
ModuleNotFoundError: No module named 'example-pkg-vamsi'  Hi, My... named 'example-pkg-vamsi' How to remove the ModuleNotFoundError: No module named 'example-pkg-vamsi' error? Thanks   Hi, In your
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

Ads