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 / rakesh

Private constructor can be used if we do not want any other
class to instantiate the class. This concept is generally
used in Singleton Design Pattern. The instantiation of such
classes is done from a static public method.

Is This Answer Correct ?    54 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

23. Storage space in java is of the form Stack Queue Heap List 24. What is java code embedded in a web page known as Applets Servlets scriptlets snippets 25. Which of the following attributes are compulsory with an tag?. code,height & width. 26. What does 'CODEBASE' in an applet tag specify?. Files absolute path.

2470


Define jre i.e. Java runtime environment?

1008


Why scanner is used in java?

1069


Is string an object?

1118


Is singleton class thread safe?

996


Which java ide is used the most?

1007


What is an infinite loop in java? Explain with an example.

1036


Why char array is favored over string for the storage of passwords?

1072


What is the default size of set in java?

964


Can static methods be inherited?

1047


How do you implement tree mirroring in java?

1077


What are meta-annotations?

992


Which data type is a class in java?

1002


When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?

998


What are the differences between stringbuffer and stringbuilder?

1057