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 are the differences between string, stringbuffer and stringbuilder?
Can an interface have a constructor?
Can I use % with real numbers?
Can inner class have constructor?
What is the purpose of the file class in java programming?
Explain heap sort?
what is meant wrapper classes?
What is difference between variable declaration and definition?
What is the replace tool?
Define a java class.
what is the difference between multitasking and multithreading?
According to java operator precedence, which operator is considered to be with highest precedence?