Answer Posted / vidya bhushan dwivedi
The variable should be declared as static and final. So only one copy of the variable exists for all instances of the class and the value can't be changed also.
static final int MAX_LENGTH = 50; is an example for constant.
Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
Explain about field hiding in java?
What is return in java?
What is r in java?
How do you convert boolean to boolean?
Can we have try without catch block?
EDS (Electronic Data Systems India Pvt Ltd) at Chennai on 16-12-2006.
Explain the meaning of java applet.
How to make object serializable in java?
Can we overload final method in java?
What will be the default values of all the elements of an array defined as an instance variable?
How many functional interfaces does java 8 have?
What is bom encoding?
How does compareto method work?
How do I type unicode?
Define the term string pool?