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 declaring constructor as private?

Answer Posted / ranganathkini

By declaring the class constructor as private, other classes
cannot create instances of the class.

This design is usually used in singleton patterns.

Is This Answer Correct ?    22 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is generics in java interview questions?

1065


What is the public field modifier?

1028


What is multithreading and its advantages?

1071


What is strings in java?

1043


What is a blocking method in Java?

1242


List any five features of java?

1031


What’s the difference between the methods sleep() and wait()?

1012


What are three ways in which a thread can enter the waiting state in java programming?

1165


What is object-oriented programming?

1122


Can we force garbage collector to run ?

1056


What's the access scope of protected access specifier?

1040


What does s mean in regex?

1019


Explain about doubly linked list

1032


Difference between error and exception

6062


Difference between throw and throws?

1105