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 implement Singleton

Answer Posted / ajooba

since 1.5 version best way is to use an enum

public enum My
{
instance;
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is null keyword in java?

895


Explain different ways of creating a thread. Which one would you prefer and why?

998


If a method is declared as protected, where may the method be accessed?

972


What is scope & storage allocation of static, local and register variables? Explain with an example.

972


What is the difference between stream and buffer?

931


What is ascii format?

950


How a string is stored in memory?

973


Can a static class implement an interface?

1070


what is singleton class in java?

1002


please send me hr interview questions in it industry

2074


Can we call thread start () twice?

922


What is math exp in java?

1013


Is java a prime method?

947


What is rmi and steps involved in developing an rmi object?

1012


Why java doesn’t support multiple inheritances?

982