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 the base class of all classes?
Can we sort hashmap in java?
What is a buffer in java?
Why Java doesn’t support multiple inheritance?
which class is the wait() method defined in? : Java thread
What is the collections api in java programming?
What is yield () in java?
Define the term string pool?
Why is multiple inheritance not supported in java?
JSP is by default thread safe or not? what is the meaning of isThreadSafe="true" and isThreadSafe="false". Explain it? Thanks, Seenu
Can we sort list in java?
What is the difference between post and put?