How to create an instance of a class if the class has
private constructor?
Answer Posted / krishnanv
The above answer is perfectly ok only one thing missing i.e
the getObj() method must be static, then only we can call
directly without instantiating that class object.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is method overloading in java ?
what invokes a threads run() method? : Java thread
which is advanced deep technology in java launched by the sun microsystem??? The answer is very logical If u need correct answer mail me at priya_gupta@gmail.com
What are the benefits of immutable objects?
What is the Scope of Static Variable?
What are the different types of inner classes?
What is array size in java?
Can we overload the main() method?
What is mean by encoding?
What are adapter classes?
What are the data types supported by java?
How do you input a string in java?
What is an example of a keyword?
Where to store local variables?
What is the purpose of the system class in java?