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 |
What Is Query Throttling in java?
What is the default execution method in java?
How can final class be used?
What is hard code & soft code?
What is the current version of java?
Which java.util classes and interfaces support event handling?
What is Java Reflection API? Why it’s so important to have?
Explain the importance of throwable class and its methods?
What Is Composition?
Is it possible to compare various strings with the help of == operator?
what should do when using multiple catch() block & what should never do for the same?
What are the major drawbacks of external iteration?