What are the other ways to create an object with out calling
new keyword in java?
Answers were Sorted based on User's Feedback
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 |
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 |
sample and simple coding where we get?
What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?
why rownum=1 works properly but not rownum=>2,=>3 etc.
Is class is a abstract datatype in java?
how to data grid use in data bind?
what is difference between object oriented programming structure and object oriented programming system?
what is the software to run the GSM gate opener program
This is the portal and portlet interview question API: is JSR 168 API Server: is ibm web sphere portal server6.0 IDE: is RAD 7.0 Question:In normal struts what is the actionservlet? Ans:org.apache.struts.action.ActionServlet. But What is the actionservlet in strutsportlet?
how do we provide security for web services
can we use commit,rollback in triggers and how?
how will you code the subfile which is in editing mode (multiple case subfile)?
Difference between delegates and Events?