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

Answers were Sorted based on User's Feedback



how can u create the object with out new operator..

Answer / 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

how can u create the object with out new operator..

Answer / bindhu

As my opinion, we can create object of String using 2 ways:
String s=new String("java");
String s="java";

in Other way ,we can clone an object,that will create a
new copy of an object.

or using Class.forName();( Not Sure....)

Is This Answer Correct ?    6 Yes 1 No

Post New Answer

More Core Java Interview Questions

What does super()represent, and how is it used in Java?

2 Answers  


What is an example of character?

0 Answers  


What are the three parts of a lambda expression?

0 Answers  


What is starvation?

0 Answers  


What are scriptlets?

0 Answers  


Why destructor is not used in java?

0 Answers  


Any one can explain how the inerface uses in java. give with example.

1 Answers   IBM,


Explain aggregation in java?

0 Answers  


How the interruptible method gets implemented?

0 Answers  


What are "class access modifiers" in Java?

0 Answers   Genpact,


what is the difference between yielding and sleeping? : Java thread

0 Answers  


Why there is no call by reference in java?

0 Answers  


Categories