Create your account

Already have an account? Login here

Note: By joining, you will receive periodic emails from Coursetro. You can unsubscribe from these emails.

Create account

66. This Keyword And Variable Hiding Explained

Getting Started with Java

Woah, wait a second..

This is a 100% free course, but we need you to first join or login to watch this video.

Alright, join or login here.

This video introduces the ‘this’ keyword in Java after showing how variable scope and lifetime differs for local, parameter, static and instance variables. When a static variable and a local or parameter variable have the same name, the local or parameter variable hides it. When an instance variable and a local or parameter variable have the same name, the local or parameter variable hides it. The this keyword points to the current object in question. The ‘this’ keyword can refer to non-static variable or non-static method from the same class along with constructors.

Course Cirriculum