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 differences between collection api and stream api?
What is the reflection?
Is an object null?
What does percent mean in java?
What are the types of methods in java?
What will be the output of round(3.7) and ceil(3.7)?
Is jdk required on each machine to run a java program?
Can we call a non-static method from inside a static method?
How do you compare arrays in java?
What is a jit compiler?
What is square root in java?
What is static method with example?
What is the role of garbage collector in java?
What is the difference between heap and stack memory?
What is natural ordering in java?