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 will be the output of round(3.7) and ceil(3.7)?

1168


What is meant by data hiding/encapsulation?

1157


What is the use of object and class classes?

1078


What is a null check?

1070


What is r * in math?

1041


What is the difference between preemptive scheduling and time slicing in java programming?

1067


How do you check whether the list is empty or not in java?

1018


Explain the use of volatile field modifier?

1136


Why is a constant variable important?

997


How do you compare two strings lexicographically?

977


Tell me about your ability to work under pressure

2246


Is class forname reflection?

1034


Can static method access instance variables ?

1183


What is the difference between class & object?

1061


Is double bigger than float?

1040