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

What are the Class Libraries ?

817


How do I get a substring?

757


What is java thread dump, how can we get java thread dump of a program?

800


Is hashset ordered?

778


What happens when heap memory is full?

767


What are the escape sequences in java?

780


What does nullpointerexception mean?

874


What is an example of a boolean?

821


How many types of interfaces are there?

787


What is a top level class in java?

760


What is java used for?

809


What do you understand by weak reference?

763


Is java still necessary?

850


What is a line break example?

784


What does the “static” keyword mean? Can you override private or static method in java?

846