how can u create the object with out new operator
Answers were Sorted based on User's Feedback
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 I debug the Java security exceptions and AccessControlExceptions?
Explain the concept of proper inheritance?
0 Answers Thomson Reuters, Virtusa,
How can we achieve thread safety in java?
posted in online test
Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?
Explain JPA in Java.
What is method in java ?
Can we have multiple public classes in a java source file?
What is singletonlist in java?
Differentiate constructor and a method and how are it be used?
Can you make a constructor final in Java?
0 Answers SwanSoft Technologies,
what is collections in java?