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

Answer Posted / udaychow

only once instance of a particular class is allowed.through
private constructor only we can achieve singleton design
pattern.

Is This Answer Correct ?    8 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why generics are used in java?

546


What are abstract methods in java?

645


Can we serialize static variables in java?

648


Give us the name of the list layoutmanagers in java?

522


What is regex in java?

526






Difference between predicate, supplier and consumer ?

572


Explain about sets?

565


Can list be null in java?

572


What are adapter classes?

597


Describe the process as to how substring() methodology mechanisms in java.

554


What are the common uses of "this" keyword in java ?

568


What is multithreading in java?

544


Explain features of interfaces in java?

549


What is remote method invocation (rmi)?

610


what type of questions asked for barclays technologies pune please send urgent

5226