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

How to create an instance of a class if the class has
private constructor?

Answer Posted / krishnanv

The above answer is perfectly ok only one thing missing i.e
the getObj() method must be static, then only we can call
directly without instantiating that class object.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you convert bytes to character in java?

957


How destructors are defined in java?

1147


Is integer a class?

1030


Difference between stack and queue?

1035


What is the default value of the local variables?

979


Why we used vector class?

1035


What is the difference between keyword and identifier?

990


How do you compare two strings lexicographically?

899


Which package is imported by default?

1045


Define the term string pool?

972


What is nan inf?

1007


What are the important features of Java 11 release?

1075


Where is core java used?

980


What is java object name?

954


What access modifiers can be used for variables?

1091