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

How can I debug the Java security exceptions and AccessControlExceptions?

0 Answers   IBM,


Explain the concept of proper inheritance?

0 Answers   Thomson Reuters, Virtusa,


How can we achieve thread safety in java?

0 Answers  


posted in online test

1 Answers  


Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?

0 Answers  


Explain JPA in Java.

1 Answers  


What is method in java ?

0 Answers  


Can we have multiple public classes in a java source file?

0 Answers  


What is singletonlist in java?

0 Answers  


Differentiate constructor and a method and how are it be used?

7 Answers   Wipro,


Can you make a constructor final in Java?

0 Answers   SwanSoft Technologies,


what is collections in java?

4 Answers  


Categories