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
Java is pass by value or pass by reference? Explain
how to prepare for IT Officers Interview in Banks
How do you represent a space in regex java?
Write a program to reverse a number in java?
What is java argument list?
What is java abstraction with example?
who can i handle multiple client in RMI
Compare overloading and overriding?
What is the basic of java?
What is the difference between int and integer in java?
How to compare strings in java?
Can we declare an array without size in java?
What does system.gc() and runtime.gc() methods do?
What comes to mind when someone mentions a shallow copy in java?
Does importing a package imports its sub-packages as well in java?