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 the unit of plancks constant?

1044


Where is stringbuffer stored?

971


What is stack explain?

989


What is the use of static class?

1176


What is meant by oops concept in java?

985


When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?

997


Explain about interthread communication and how it takes place in java?

1018


Can a class have multiple constructors?

1027


What are the main features of java?

964


Write a program to print count of empty strings in java 8?

994


State differences between C and Java?

1201


Why java is made?

961


Explain about the performance aspects of core java?

1048


Is it possible for yielded thread to get chance for its execution again ?

1022


How big is a 32 bit integer?

1035