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
Is array dynamic in java?
What is the difference between a method and a procedure?
What is a values collection view ?
What is difference between equals and hashcode method?
What is the difference between this() and super() in java?
What is meant by method?
Difference between string s= new string (); and string s = "abv";?
How variables are declared?
What is considered an anti pattern?
Can we use switch statement with strings?
How do you sort a set in java?
What is a function easy definition?
How are destructors defined in java?
How an object is serialized in java?
Is there any limitation of using inheritance?