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 format specifiers in java?
when a servlet sends request for first time it uses the follwing methods a)init b)doget() c)dopost() d)service
Does java runtime require a license?
Explain restrictions for using anonymous inner classes?
What is purpose of find feature?
How does JAVA ClassLoader work?
Can we use both this () and super () in a constructor?
Can a static method be overridden in java?
explain about casting of objects?
What is local class in java?
How to create packages in java?
How many types of exception can occur in a java program?