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

How do I find and replace in word?

1025


What's the default access specifier for variables and methods of a class?

1166


How do I type unicode?

1028


What is an immutable object? How do you create one in java?

1108


Can substring create new object?

1189


What are wrapper classes in java?

1130


What are the methods used to implement for the key object in the hash map?

1094


How do you reverse a list?

1051


How to create an immutable class?

1174


What is constructor chaining in java?

1118


How does arraylist size increase in java?

1175


Is linked list a linear or non-linear data structure?

1013


How listener identify that the event came from a particular object?

2052


What are the advantages of exception handling?

1119


What’s the difference between the methods sleep() and wait()?

1069