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...

what is the use of private constructor in core java?

Answer Posted / deep chandra harbola

private constructor are used to create Sinleton class.
example logger class
for singleton class only one object can be created.
by default member of singleton class are static.
singleton class can not be inherited.

Is This Answer Correct ?    29 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define how objects are stored in java?

1062


Can we have more than one package statement in the source file?

1060


What is a variable simple definition?

1020


How do you read and print a string in java?

957


What are java packages? What's the significance of packages?

1331


Can you sort a list in java?

982


What is static variable with example?

1014


Explain where variables are created in memory?

1014


Define jit compiler?

1140


What are the types of casting?

1068


Why are data types important?

1094


Can we execute java program without main method?

1110


List out five keywords related to exception handling ?

1018


Can you explain inner class.

1089


What will happen to the exception object after exception handling?

996