why the constructor should be used in class,if there is no
constructor what will happen?
Answer Posted / ravikiran
constructor is used to initialize the variables during the
creation of instances.
If there is no constuctor no object will be gets created.
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What is Garbage Collection in Java
What is a default method?
What is exception propagation?
What is java basic concept?
Which object oriented concept is achieved by using overloading and overriding?
What are the differences between include directive and include action?
Describe method overriding
What does replaceall do in java?
What is sortedmap in java?
What is stack example?
What are the uses of synchronized keyword?
How do you calculate roots in java?
Can we use string in switch case in java?
What is a constructor overloading in java?
Explain importance of inheritance in java?