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 mutability?which one is mutable String or StringBuffer?and why?give examples of each which shows the mutability of each String or StringBuffer
What are the uses of synchronized keyword?
how we can write the string concatenation program in java.
What is an object’s lock and which object’s have locks?
Difference between JDK, JRE, JVM
16 Answers Deloitte, HCL, Mind Tree, Oracle, Reliance, TCS, ThinkBox,
Is this valid in java ? Can we instantiate interface in java?
Can we convert integer to string in java?
Can we start a thread twice in java?
What are the types of casting?
Explain the difference between the Boolean & operator and the && operator?
What type of value does sizeof return?
What is the difference between panel and frame ?
7 Answers HCL, IBM, Raim Techno Solutions,