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 |
Can you inherit a constructor java?
how to write a server program and sending the mails to the server using smtp protocol please help me
what is the use of reference variable
What are parent methods and how can you call them?
class A { public void disp(int a,int b) { System.out.println("hai"); } } class B { public void disp(int a,int b,int c) { System.out.println("hai"); } } above program is overloading or overriding?
What is hashing principle in java?
How do I print a “?
Hai all I want to print given array in reverse order Ex: int a[]={1,2,3,4,5};display this array in reverse order.
can two class in a code be public??if yes then how??
Does garbage collection occur in permanent generation space in jvm?
how can you retrive information from database by using hashmap/arraylist ,plz explain with example briefly?
Difference between canvas class & graphics class?