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

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

Answer Posted / puneet khanna

this is used to either call another constructor of the same
class whose object is used to call a method; or whose
constructor is being used to instantiate a class.
This refers to the current object whose reference variable
is used to call method or this refers to the current object
in action,
Super refers to the immediate super class, super(); is
itself placed in the constructor of the class whose super
class doesnt has a constructor declared;for consructor
chaining mechanism.

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which are the two subclasses under exception class?

1095


What is the difference between scrollbar and scrollpane?

1090


How can we find the actual size of an object on the heap?

1316


What is encapsulation in java?

1116


Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)

1338


What is meant by inheritance and what are its advantages?

1109


Is java 1.7 the same as java 7?

1051


Is a case study a method or methodology?

900


How to perform selection sort in java?

1001


When is finally block not called?

1093


What is meant by interface?

1060


Can I learn java without any programming experience?

1044


What is anonymous inner class?

1083


What is the common usage of serialization? What exceptions occur during serialization?

1129


Can we cast any other type to boolean type with type casting?

961