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

Explain polymorphism citing an example.

1049


What is the purpose of the file class in java programming?

1028


How do you convert boolean to boolean?

1161


What is dot operator?

1036


Is there any tag in htm to upload and download files?

1047


What is the difference between JDBC 1.0 and JDBC 2.0?

3189


What about main() method in java ?

1027


What is singleton class and how can we make a class singleton?

1100


Is null a string or object in java?

970


What are the 6 boolean operators?

1106


Is there a sort function in java?

971


What are the advantages of arraylist over arrays?

1092


What are the different ways of implementing thread? Which one is more advantageous?

987


Can you give names of Container classes?

2306


What are the main differences between the java platform and other platforms?

1061