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
What are the different ways to handle exceptions?
What is a treeset class?
What is OOP Language?
Explain the access modifiers for a class, method and variables?
What is the main use of java?
What is a package in java? List down various advantages of packages.
What are access specifiers in java ?
What is flush () in java?
How are this() and super() used with constructors in java programming?
What is functional interface in java example?
If a class is declared without any access modifiers, where may the class be accessed in java programming?
Differentiate between stringbuffer and string?
What is an argument java?
How to obtain a performance profile of java program
What are the differences between abstract class and interface?