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

1.Describe about your project?

1 Answers  


I am looking for selenium RC online Training in chennai. can any one tell me the best institute

0 Answers  


Write a program to create a process in UNIX

0 Answers  


Write a Pseudo Code to fins the LCM of two given numbers

5 Answers   Goldman Sachs,


what do you meant by Platform-Independent in Java?

6 Answers   Persistent,


cgi stands for

2 Answers   CGI,


How to set fixed width in particular <td> in html? if i type more character in this <td> it will not push near <td>. this is my question. can u tell me the answer...

0 Answers   SoftSquare,


what are the 3 forms of a prolog term

0 Answers  


Given an array of size n, containing every element from 1 to n+1, except one. Find the missing element.

0 Answers   Amazon,


What is the difference between: x=a+b+c+d; and x=SUM(a,b,c,d);?sas

5 Answers  


how to write the fallowing code in java? 1 4 9 16 25 36 49 64 81 100

1 Answers  


I m Abdullah Ansari compleated MCA from Jamia Hamdard,i have appeared the test of IBM on 2 august at oxford college of engineering Bangalore.waiting for hr round.. This is the first round for IBM.02/08/08 Paper consists of 4 sections 15 questions from matrices(time very less but no negative marking). 25 questions from series completion section (this section is very easy but negative marking) 15 questions from aptitude(little bit tough time limit 15 minute negative marking) 4th section is from computer science (c,c++,operating system,digital electronics ,basic question..) result came at 3 o'clock.i was selected... In interview they asked questions like 1 they asked about final yr project.. 2 what are dynamic and static memory location? 3 linked list and array difference between them. 4 what is function ? what is difference betwen function and inline function? 5 about structure 6 about binary tree, traversal, call by value. 7 storage class and many more basic questions..

0 Answers   IBM,


Categories