what is private constructor?what are the uses of writing
private constructor in our program?
Answer Posted / neha
we can not create instance of object with new operator.if u
do not want the class to be inherited then we declare the
construtor as private when we used Private Construtor
Static metods are used this construtor are also used for
creating singleton object
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
How will you get the platform dependent values like line separator, path separator, etc., ?
In how many ways we can do exception handling in java?
What is the core java?
What is the advantage of OOP in java?
How do you remove spaces in java?
What does escaping a character mean?
What is the final keyword denotes?
What are the main features of java?
What is %d in printf?
What does opcode mean?
Does java vector allow null?
What is string pool?
What is the difference between yielding and sleeping?
What is 16 bits called?
What is the use of singleton?