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
Name the components that are termed to be Heavy-weight component but available in Light-weight components?
How do you classify Dialog Box?
Why is stringbuffer faster than string?
Explain purpose of sleep() method in java?
What is difference between iterator and enumeration in java?
What is thread life cycle?
What is an infinite loop?
What are the types of casting?
What is mean by encoding?
How do you add an element to an arraylist in java?
State one difference between a template class and class template.
What is an example of a constant variable?
Is it possible to instantiate the abstract class?
Which oo concept is achieved by using overloading and overriding?
What is string builder?