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
What is appletviewer?
What is the nested interface?
List out benefits of object oriented programming language?
Can we have any other return type than void for main method?
What does indexof mean?
What are facelets templates?
Can a class be a super class and a sub-class at the same time? Give example.
What is argument in java?
What is the difference between C++ and Java and your preferences?
What will happen when using pass by reference in java?
What do you mean by of string::valueof expression in java 8?
Give a brief description of java socket programming?
What does ide stand for?
What is a default constructor and also define copy contrucyor?
What is the difference between serial and throughput garbage collector?