This Keyword Tutorial | All 6 Usages of This Keyword Explained

Published: 13 March 2021
on channel: Java Coding Community
825
37

This keyword tutorial in Java. Java This keyword tutorial. How to use this keyword in Java? When is this used in Java? Today I am going to show you how and where to use the this keyword in Java language!

The this keyword refers to the current object in a method or constructor. The most common use of the this keyword is to eliminate the confusion between class attributes and parameters with the same name (because a class attribute is shadowed by a method or constructor parameter).

Find the code: https://github.com/javacodingcommunit...
Instagram:   / javacodingcommunity  
Patreon:   / javacodingcommunity  

TIMESTAMPS:
0:00 - Intro
0:17 - Refer to class instance variable
2:57 - Invoke current class method
3:51 - Invoke current class constructor
7:22 - This keyword as method argument
10:04 - This keyword as constructor argument
12:17 - Return current class instance variable
13:25 - Additional information


Watch video This Keyword Tutorial | All 6 Usages of This Keyword Explained online without registration, duration hours minute second in high quality. This video was added by user Java Coding Community 13 March 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 82 once and liked it 3 people.