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

What is meant by interface?

1012


How many bits is size_t?

926


If I don't provide any arguments on the command line, then what will the value stored in the string array passed into the main() method, empty or null?

1201


Does chrome use java?

908


What happens if an exception is throws from an object's constructor?

1075


What is difference between hashset and hashmap in java?

937


What do you mean by an interface in java?

963


Can list contain null in java?

1032


Can you call a method in a method?

1010


explain autoboxing in java?

937


What is the use of list in java?

936


Can we assign null to double in java?

961


Is ++ operator thread-safe in java?

1100


What does  mean in regex?

987


What is a boolean used for?

1057