Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is formatted output in java?

894


What is constructor and virtual function? Can we call a virtual function in a constructor?

1082


Define packages in java?

944


What is a java string?

989


What is variable declaration and definition?

964


What are the different access modifiers available in java?

976


What is singleton class and how can we make a class singleton?

1056


How do you declare an empty string?

1007


What does super keyword do?

1015


What is a constructor overloading in java?

981


What is java beans?

936


Where are the local variables stored?

1014


what are different ways in which a thread can enter the waiting state? : Java thread

902


What is visibility mode?

895


Can we return null in java?

1064