When does the compiler supply a default constructor for a
class?
Answers were Sorted based on User's Feedback
Answer / satish
when we do not specify constructor expectly,java complier
provides default constructor at the time of compliation time
Is This Answer Correct ? | 14 Yes | 2 No |
Answer / devarathnam c,kotagudibanda(po
Hi... The compiler will supply defaulst constructor when u
not supplied constructor in the program.
Is This Answer Correct ? | 5 Yes | 2 No |
Answer / 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 |
Answer / ravichandra
We cannot supply any constructor in the class the compiler
supply a default constructor.
Is This Answer Correct ? | 2 Yes | 2 No |
Answer / manju
In java if we do not create the constructor,by default it
will be automatically invoked at compile time
Is This Answer Correct ? | 2 Yes | 2 No |
When we donot override the default constructor in a class,
which is extended implicitly by our class from java.lang
package, compiler supplies it.
Is This Answer Correct ? | 2 Yes | 3 No |
Answer / www.google.com
<a href="localhost.com">locahost</a> nice post
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / ravikiran
when there is no other constructor with arguments is defined
Is This Answer Correct ? | 0 Yes | 4 No |
What is purpose of applet programming?
Which is the best way to use for String concatenation in Java?
Can java run on google chrome?
Explain about map interface in java?
What is static keyword?
What is method Overloading in the perspective of OOPS?
What is mean by exception?
Differences between GridLayout and GridBagLayout?
Which sort is best in java?
Why Over riding is Run Time Polymorphism?
Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?
whays is mean by inner class?