Professional Documents
Culture Documents
This & Super Keyword
This & Super Keyword
This & Super Keyword
GAURAV
1. This keyword
What is this keyword ?
In java, this is a reference variable that refers to the current object.
state
this
behaviour
reference variable
object
Usage of this keyword
1 ashish 4500.0
2 vinay 7500.0
to invoke current
class method
invoked B
Invoked A
to invoke current
class constructor
black
white
to invoke parent
class method
Animal is eating
Dog is eating
Dog is barking
to invoke parent
class constructor
1 Ashish 45000.0
Khatam…….