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 of class Without using "New"
opertor?

Answer Posted / mohan reddy

In 3 ways we can able to create object without using "new"
operator.

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 ?    38 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an array in java?

1205


What is the simpletimezone class in java programming?

1134


Is java based on c?

997


Why do we declare a class static?

1157


What is a parameter in a function?

1000


What was java originally called?

962


What's the difference between int and integer in java?

1169


Explain naming conventions for packages?

1035


What is variable in java?

990


Is a boolean variable?

1016


What do you understand by overloading and overriding in java?

1084


Can an interface extend another interface?

1057


Why set do not allow duplicates in java?

1105


What is the difference between a checked and an unchecked exception?

998


Explain the purpose of garbage collection in Java?

1033