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 private constructor?what are the uses of writing
private constructor in our program?

Answer Posted / nandhakumar

We use private constructor in singleton class:it ve only one
instance,in this case we generally used to ve one static
method (getInstance()).While we cal this method first time
it use private constructor to create instance.next time this
method returns the existin instance..

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the special characters?

968


What is the difference between C++ and Java and your preferences?

1109


Can we sort hashset in java?

1087


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

1159


What do you mean by constant time complexity?

1226


how to create multithreaded program? Explain different ways of using thread? : Java thread

978


What is difference overloading and overriding?

1161


How is tree Mirroring implemented?

1065


Explain about wait() method?

1022


What are measurable parameters?

1068


Does variable declaration allocate memory?

1031


What is string [] java?

947


What is the Scope of Static Variable?

1225


What is pass by value?

941


How do you override a variable in java?

1133