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 |
How to use arraylist in java netbeans?
What is the code inside the public void actionPerformed(ActionEvent ae) override method in Applet [ Condition:- you have one TextField and One Button , you have to enter any color name inside the TextField, when you click on Button Your background will change according to your input color name]
how to handle exceptions in core applications?
Can we override a variable in java?
What is the base class in java from which all classes are derived?
what is jms? features of jms
How many types of variables are there?
what are the analysis of an object
Sample code to retrieve objects from HashMap in sorted ascending order?
What is identifier in java?
How many types of threads are there in java?
What is difference between null and void?