What are the other ways to create an object with out calling
new keyword in java?
Answer Posted / 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 View All Answers
Tips for blog integration by www.esteemwebsolutions.com. Can Any body suggest me to how to make wonderful questions on web integration..
Given an array all of whose elements are positive numbers, find the maximum sum of a subsequence with the constraint that no 2 numbers in the sequence should be adjacent in the array. So 3 2 7 10 should return 13 (sum of 3 and 10) or 3 2 5 10 7 should return 15 (sum of 3, 5 and 7)
how do i add a column dynamically in a table by using java application?
Compare any 4 software development life cycle paradigms with each other. Indicate at least one application for each of the paradigms that are suitable to developed using that paradigm.
HOW TO FIND NUMBER OF TWOS IN N!(N FACTORIAL)??
what is throws keyword
What is test execution and when will we start execution please send me one example for this question
it is a language or tools?
How can recruiter justified that the candidate is expert in Algorithm and datastructure for Software product development ?
how to fin top two miximum values in sql? not 2nd both max value of 1st and 2nd both have to find out
what is web configuration file
how pseudo column works?
What is the merger sort principle and its time complexity.
1. Consider the following input and generate the object code using single pass assembler. JOHN START 0 USING *,15 L 1,FIVE A 1,FOUR ST 1,TEMP FOUR DC F’4’ FIVE DC F’5’ TEMP DS ‘F END
Given: coordinates of rectangle-> left bottom and right top points. the rectangles create a hole.Find the maximum area of the hole. eg. 4 rectangles create a hole in between. find its area.