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...


What are the other ways to create an object with out calling
new keyword in java?

Answers were Sorted based on User's Feedback



What are the other ways to create an object with out calling new keyword in java?..

Answer / bala

using in class.for name method
myobject obj=(my object)class.for name("sub in.rnd.my object").new instance();

Is This Answer Correct ?    1 Yes 0 No

What are the other ways to create an object with out calling new keyword in java?..

Answer / sumitpalsingh

1.by using newInstance();,but before this we have to load the class by using Class.forName();

myobject obj=(my object)class.for name("sub in.rnd.my object").new instance();

2.By using clone();
3.BY using DeSerialization.
ObjectInputStream inStream = new ObjectInputStream(anInputStream );
MyObject object = (MyObject) inStream.readObject();

4.By using String class .

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Programming Languages AllOther Interview Questions

can any method return type may be constructor , or that method name allow

0 Answers   HCL,


what is mutex?

4 Answers   Axiom, Blue Star, SQL Star,


Hi All, Can any one please send me the difference between informatica 7i and 8i versions, Thanks in advance. vinod

0 Answers  


what is difference between java and c#

2 Answers   Cyient,


iam confused among testing ,.net and java. can anybody help me.

0 Answers  


what is the pl/sql block size in oracle 10g and 11g?

0 Answers  


differences between qtp10.0 and 11.0 ?

0 Answers  


< No Frames > tag is used for

0 Answers  


MOV.CB 007H,ADCON1 MOVE.CT 001H,_OPTION_REG_7 MOV.CB 007H,CMCON

0 Answers  


What is the difference between procedure -oriented language and object oriented language?

22 Answers   IBM, Infosys, TCS,


what is technical system, business system, logical system in sap pi7.0

0 Answers   IBM,


What does this useful command line do? tasklist /m "mscor*"

1 Answers  


Categories