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 Is Query Throttling in java?

0 Answers   HCL,


What is the default execution method in java?

0 Answers  


How can final class be used?

5 Answers   Accenture, Wipro,


What is hard code & soft code?

7 Answers   Cognizant, Wipro,


What is the current version of java?

0 Answers  


Which java.util classes and interfaces support event handling?

2 Answers  


What is Java Reflection API? Why it’s so important to have?

0 Answers  


Explain the importance of throwable class and its methods?

0 Answers  


What Is Composition?

0 Answers   IBS,


Is it possible to compare various strings with the help of == operator?

0 Answers  


what should do when using multiple catch() block & what should never do for the same?

1 Answers  


What are the major drawbacks of external iteration?

0 Answers  


Categories