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
How is the marker interface used in Java?
What are the differences between string, stringbuffer and stringbuilder?
Can a class be private?
What is the difference between private & public & friendly classes?
How to perform merge sort in java?
How do I get the | symbol on my keyboard?
What is the method in java?
What are "class access modifiers" in Java?
What is thread life cycle?
Can we create a constructor in abstract class?
Write a method that will remove given character from the string?
what are three ways in which a thread can enter the waiting state? Or what are different ways in which a thread can enter the waiting state? : Java thread
Explain about arraylist?
How many threads can I run java?
What is a map in java?