Can we have a private constructor ?

Answer Posted / ravi`

no,
we can not make a constructor private , if we make a
constructor private its method cannot access in main method .

Is This Answer Correct ?    17 Yes 136 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a class oop?

594


What does <> mean pseudocode?

626


Can a varargs method be overloaded?

619


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

1625


program for insertion ,deletion,sorting in double link list

2285






Explain virtual inheritance?

688


Why is polymorphism important in oop?

637


What are the 4 main oop principles?

687


hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.

1545


What does sksksk mean in text slang?

1542


Can destructor be overloaded?

603


How to call a non virtual function in the derived class by using base class pointer

5283


what is difference between class template and template class?

2162


What is the benefit of oop?

573


Give an example where we have to specifically use C programming language and C++ programming language cannot be used?

1152