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?

Answer Posted / kabita

'this' and super are two keywords in java.
'this' doesn't support inheritance bt 'super' supports
inheritance.
this keyword is used in two cases
1.to differentiate betn instance and local variables.
2.calling of one constructor from another constructor.
Restriction:this keyword should be written in lowercase &
must used in firstline.more than one 'this' keyword is not
used in one block.
super is used 4 three reason.
1.differentiates betn superclass variable & child class
variables.
2.calling of superclass constructor in childclass
constructor.
3.it is also used in calling of superclass override method
in child class.
restriction:
it must be in 1stline.
must be in lowercase.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Garbage collection in java?

1066


what is the role of xml in core java?? and how we can use it?? can somebody give a sample program with explanation and from where i can read more about xml?????

2316


How can you write a loop indefinitely in java programming?

1070


Why is string buffer better than string ?

1193


What is a method type?

1036


What is difference between variable declaration and definition?

1011


How do you invoke a method?

1049


Describe string intern() methodology

1111


What are the differences between heap and stack memory?

1143


What is a char in java?

1093


Explain about anonymous inner classes ?

1127


What is double in java?

1035


what is synchronization? : Java thread

1070


How to solve the problem of generating the unique hash keys with hash function?

1950


What is difference between call by value and call by reference?

1067