why the constructor should be used in class,if there is no
constructor what will happen?
Answer Posted / yamini
Constructor is used initialize certian paramameters to each
object on their creation.We can also overload
constructors.So we can initialize objects with diff params.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Which number is denoted by leading zero in java?
Explain oops concepts in detail?
Can java inner class be static?
Will set allow duplicates in java?
Which class is the superclass of all classes?
Is string thread safe in java?
Is an array a vector?
Which package has light weight components in java programming?
How do I get 64 bit java?
Why is stringbuffer called mutable?
I want my class to be developed in such a way that no other class (even derived class) can create its objects. How can I do so?
What is size of int in java?
What is an iterator interface in java programming?
How many bytes is a string java?
Why do we create public static method in java?