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 two main uses of volatile in Java?
why interfaces are faster than abstract classes?
How to pass arraylist to stored procedure in java?
What is the latest java version?
What is the difference between hashmap and hashtable in java?
Explain the concept of proper inheritance?
0 Answers Thomson Reuters, Virtusa,
Does java trim remove newline?
Can we declare a constructor as final?
what is the difference between the "protected and default" modifiers?
What is split return?
String Reverse in Java...!
Can we use different return types for methods when overridden?