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 can u create the object with out new operator

Answer Posted / md. abid hossain

In 3 ways..
1)Using a Static Factory Method
ABC.getInstance();
2)Using newInstance() method...
class A=(A)Class.forName("A").newInstance();
3)Using clone() method.

Is This Answer Correct ?    11 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we declare an interface as final?

1048


What is return code?

999


what is the difference between thread and runnable types? : Java thread

986


What is the difference between path and classpath variables?

1031


What are different ways of object creation in java ?

1065


What do you mean by static variable?

1058


Is java hashset ordered?

1097


How do you check if an arraylist is not empty?

1102


Why is string class considered immutable?

1035


Why we override equals() method?

1024


Can we extend private class in java?

970


What happens to a static var that is defined within a method of a class?

1016


what is the difference between a threads start() and run() methods? : Java thread

1006


Why set is used in java?

991


How would you dynamically allocate memory to an array?

1028