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

How many types of threads are there in java?

1050


When throws keyword is used?

989


Which access specifier can be used with class ?

990


Write a program to check for a prime number in java?

1035


What is the main functionality of the remote reference layer?

1988


When a lot of changes are required in data, which one should be a preference to be used? String or stringbuffer?

1234


Can you instantiate the math class in Java?

1081


When is the finalize() called? What is the purpose of finalization?

1065


What is stream api in java8?

1153


What is binary tree in java?

1047


What is linked hashmap and its features?

998


What is the difference between an interface and an abstract class?

994


Explain the transient field modifier?

1027


Explain about transient variables in java?

1091


What is compareto () in java?

968