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

How do you differentiate abstract class from interface?

961


What is the set interface in java programming?

1213


What do you mean by buffering?

1046


What are thread groups?

1005


How many bytes is a string?

1135


When throw keyword is used?

1071


What does %4d mean in java?

1480


Can there be an abstract method without an abstract class?

955


What is arraylist class in java?

1068


how can i use a nonsynchronized hashtable?

2571


Can we declare array without size in java?

1039


What is the difference between this() and super() in java?

1046


What is the size of a string in java?

1015


How can you generate random numbers in java?

1049


How do you escape in java?

1081