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...

How are this() and super() used with constructors?

Answer Posted / sushila sonare

When we create an object, first constructor called. In a
constructor first statement should be either this() or
super(). If we didn't keep anything compiler kept super()
statement so constructor chain will be completed. Control
goes to Object class constructor and object creation will
completed. Suppose this() statement kept in constructor than
current class suitable constructor called and this chain
will be continue until control goes to Object 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

Which package is always imported by default?

1144


What are the advantages of assembly language?

965


When parseint method can be used?

987


How to sort an unsorted array in java?

1187


Are true and false keywords?

1069


What does business logic mean?

1049


What is the static variable?

1180


What is int short for?

1115


What is the symbol for average?

1081


What does a method signature consist of?

1049


How do I compare two strings in word in java?

1040


What is thread safe in java?

1046


What do you mean by data type?

1063


In a container there are 5 components. I want to display all the component names, how will you do that?

2248


What type of variable is gender?

1041