what is private constructor?what are the uses of writing
private constructor in our program?

Answer Posted / neha

In Private Construtor is that
1. We used The Private acess Modifier
2. In Private Construtor We can Not Create the instance Of
this Class in Outside Class
3. We can used only Static Data Member In Private Construtor

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is Session reduplication and how its done?

1569


What is use of a abstract variable?

543


Is a method a function?

557


Is 0 an irrational number?

609


What are keyboard events?

616






Explain the use of shift operator in java. Can you give some examples?

547


What are java threads?

625


What do you understand by looping in java? Explain the different types of loops.

569


Explain the difference between collection api and stream api in java8?

513


What are conditionals and its types?

594


how are methods defined?

555


How to stop a thread in java? Explain about sleep () method in a thread?

592


Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)

857


Which is the best approach for creating thread ?

729


describe method overloading

541