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 :: operator in java?

916


Difference between current previous versions of Java?

975


How do you define a set in java?

944


State some advantages of java?

1180


How the metacharacters are different from the ordinary characters?

974


What are the 2 types of java programs?

1045


What is final class?

958


What is difference between fileinputstream and filereader in java?

994


How to make a class or a bean serializable?

911


String class is defined under which package in java?

1019


What loop means?

902


How does a cookie work in Servlets?

789


Define Multiprogramming and Multiprocessing in java.

1063


How to reverse a string in java?

998


Write a java program for binary search?

1008