How to define a constant variable in Java?
Answer / 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 |
Explain wait() method of object class ?
Is java a prime method?
Why is prepared Statement, Callable Statement used for? What is the need of Batch updates?
What are the differences between getting and load method?
What are passing parameters?
State the difference between strings and arrays.
what is Vector class?
Why is the main method declared static?
What do you mean by platform independence of Java?
How can an exception be thrown manually by a programmer?
what is the meaning of java.lang and java.util
Difference between array and arraylist.
23 Answers Arise Solution, Banca Sella, iFocus, NIC, Sai Softech, Solartis, TCS, Verizon,