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 operators and its types?
Differentiate between the constructors and methods in java?
What are benefits of java?
What is the super void?
Is alive and join method in java?
What is java jit compilers?
what is the difference between preemptive scheduling and time slicing? : Java thread
What is java ceil?
How do you access command-line arguments within the code?
Which class is the superclass of all classes?
How are observer and observable used in java programming?
What are the important features of Java 11 release?
What does nullpointerexception mean?
What is null data type?
What is the use of math abs in java?