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
Why there are some null interface in java? What does it mean?
Can we use a default constructor of a class even if an explicit constructor is defined?
What methodology can be utilized to link to a database?
Name few java 8 annotations ?
What is a variable simple definition?
Can you inherit from an abstract class java?
What is an object's lock and which object's have locks in java programming?
explain the difference between jdk and jvm?
What is * argv?
Is java se open source?
Why lambda expression is used in java?
What are register variables what are the advantages?
What happens when main () method is declared as private?
Does the order of public and static declaration matter in main method?
What does || mean in code?