Professional Documents
Culture Documents
Midterm topics-Chapter3-Inheritance and Polymorphism
Midterm topics-Chapter3-Inheritance and Polymorphism
this
this keyword in Java is a special keyword which can be used to represent current
object or instance of any class in Java.
“this” keyword can also call constructor of same class in Java and used to call
overloaded constructor.
The protected modifier can be applied on data and methods in a class. A protected data or a
protected method in a public class can be accessed by any class in the same package or its