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
Explain about class in java?
What is the purpose of a default constructor?
What is the difference between integer parseint and integer valueof?
Are global variables initialized to zero?
How to instantiate static nested classes in java?
What is the difference between Grid and Gridbaglayout?
Can you extend singleton class?
What are recursive functions? Give some examples?
What does this () mean in constructor chaining concept?
How can we break singleton in java?
What are the features of junit?
What is externalizable interface?
What are different types of control structures?
What is space character in java?
Explain the difference between extends thread vs implements runnable in java?