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

What is port number in java?

1038


Is a copy constructor?

1055


What are keywords in programming?

1012


How do you include a string in java?

991


Does unicode support all languages?

1031


What is var keyword ?

1183


Give any two differences between C++ and java.

1146


Can you declare an interface method static?

1060


Explain what is Marker interface?

1090


Why string is called as immutable?

949


What are some characteristics of interference class?

995


Can we sort list in java?

973


What is the use of jtable?

1126


How do you implement polymorphism in our day to day life?

3231


What is listnode in java?

988