In what circumstances, compiler will supply a default
constructor for a class?

Answer Posted / ranganathkini

If no constructors are explicitly defined for the class,
Java supplies a default no-arg constructor which does
nothing more than initialize the fields of the class to
their default value.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where local and global variables are stored?

537


What is import java util arraylist?

648


What is use of map in java?

504


What is the difference between jdk and jre?

599


What is the difference between overriding and overloading in OOPS.

548






What is the default value of local and global variables?

559


What is the maximum size of byte array in java?

531


What are the differences between the constructors and methods?

568


Can a serialized object be transferred via network?

510


Can we start a thread twice in java?

506


What is http client in java?

513


What is deserialization?

581


What is java english?

486


I want to re-reach and use an object once it has been garbage collected. Define how it’s possible?

566


Explain how hashmap works?

586