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 |
does java support pointers?
How would you format a date in java? I.e. In the ddmmyyy format?
What is charat java?
What are keywords and reserved words in java?
What is a copy constructor in java?
Considering notepad/ie or any other thing as process, what will happen if you start notepad or ie 3 times? Where 3 processes are started or 3 threads are started?
why did you choose your career in IT?
What is difference between == equals () and compareto () method?
What is the purpose of the enableevents() method?
What are the advantages of arraylist over arrays?
What is this keyword used for?
What is the function of java?