Can we have a private constructor ?
Answer Posted / prabha govind
yes
and if a constructor is made private/protected...then that
class cannot be inherited
| Is This Answer Correct ? | 116 Yes | 23 No |
Post New Answer View All Answers
How do you achieve runtime polymorphism?
Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
What is polymorphism and its types?
What is polymorphism explain its types?
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
How oops is better than procedural?
What are main features of oop?
Is enum a class?
Why is destructor used?
Why multiple inheritance is not allowed?
What is abstraction with example?
What are the benefits of polymorphism?
can we make game by using c
What is encapsulation in simple terms?
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?