Answer Posted / 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 |
Post New Answer View All Answers
What package is math in java?
Is java a virus?
What does isempty () do in java?
What are three ways in which a thread can enter the waiting state in java programming?
What are namespaces in java?
What does opcode mean?
Where will it be used?
When should I use a singleton?
What do you know about java?
What is the advantage of functional interface in java 8?
What is the difference between a loader and a compiler?
What is the purpose class.forname method?
What are loops in java? What are three types of loops?
What is the difference between form & report?
Write a program to print fibonacci series