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
Name four container classes.
What is the benefit of abstract class?
What class allows you to read objects directly from a stream?
What is widening and narrowing in java? Discuss with an example.
What is mvc in java?
Tell me a few examples of final classes defined in Java API?
Tell me about different OOPS concepts.
Can a class be defined inside an interface?
What is outofmemoryerror in java?
Why is stringbuffer called mutable?
What is the definition of tree ?
Is null == null in java?
Explain java coding standards for classes or java coding conventions for classes?
What is floor math?
What is functional interface in javatpoint?