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

Answer Posted / vijayakumar chinnasamy

If there is no constructor in the class , then the compiler
create a default constructor with access specifier of class.


class A{ } - compiler create default constructor for this
class.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you use spaces in java?

620


What is map and hashmap in java?

694


How will you load a specific locale?

618


What do you mean by platform independence?

676


What is the byte range?

681






What is the benefit of singleton pattern?

638


What is meant by object oriented programming – oop?

640


Define inheritance with reference to java.

669


Is this valid in java ? Can we instantiate interface in java?

642


What is the collections api?

662


Is string an object?

767


What is collection class in java? List down its methods and interfaces.

621


What is the main function in java?

623


what is the volatile modifier for? : Java thread

616


What variables are stored in stack?

625