Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to define a constant variable in Java?



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

Post New Answer

More Core Java Interview Questions

Can java object be locked down for exclusive use by a given thread?

0 Answers  


Why is java architectural neutral?

0 Answers  


How do you sort a list in java?

0 Answers  


How do you classify Dialog Box?

0 Answers   CGI,


How many types of string data types are there?

0 Answers  


What is the purpose of the finalize() method?

0 Answers  


If two threads have same priority which thread will be executed first ?

0 Answers  


What is meant by design patterns?

0 Answers  


What is primitive array?

0 Answers  


What is Yield() method when we r using this ? tell exactly

2 Answers  


explain multi-threading in java?

0 Answers  


What is passing value java?

0 Answers  


Categories