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 string intern in java?
What is the difference between Object and Instance?
How do you sort a string in alphabetical order in java?
Can a lock be acquired on a class in java programming?
What is meant by the value of a variable?
where u use Abstraction and Interface in real time
Can we return null in java?
what is Dictionary? and what purpose it is used for?
Mention some features of java?
What is a char in java?
What are event-delegation model and event-inheritance model? Which is best?
Is 'sizeof' a keyword?