When does the compiler supply a default constructor for a
class?
Answer Posted / puneet
java follows the constructor chaining and whenever a class
in instantiated,the cons of the super class is always
invoked and to follow that when a class without contructor
is loaded then the compiler at the compiler gives it a
default constructor in order to help that make instantiated
and invoke the super class cons, it autmatically makes a
consturc at compile time and writes the first line as
super(); which invokes the super class constructor.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What are bind parameters?
How will you print number in reverse (descending) order in BST.
What is the difference between the direct buffer and non-direct buffer in java?
What is the benefit of inner classes in java?
What does += mean coding?
Which software is used for java programming?
Explain different states of a thread in java?
When parseint method can be used?
Are primitives objects?
When should you use arraylist and when should you use linkedlist?
What are different ways of object creation in java ?
What does indexof mean?
why are there separate wait and sleep methods? : Java thread
What is a short in java?
What is the applet security manager, and what does it provide?