Java This Keyword - Java Programming Tutorial

preview_player
Показать описание
What is THIS Keyword in Java?
Keyword THIS is a reference variable in Java that refers to the current object.

Like, share and subscribe our channel for more videos.

THANKS! We appreciate you reading this and hope you have a wonderful day!

Sincerely,
Guru99
Рекомендации по теме
Комментарии
Автор

I am more of a visual learner. The simple visuals in this helps so much. I also learn better if I know WHY we are doing something. In other words, try to answer the question "what problem are we trying to solve?" This video also explains that. Most educators teach by saying "watch me code" and I find that frustrating. This is a superior source - thank you!

johnbateman
Автор

these are THE BEST TUTORIALS I have no idea why u can explain so simply and no teachers can, simple to the point with great real world examples... GREAT for refreshers

BALLAsTvDotCom
Автор

I have spent almost half an hour searching about this. keyword without understanding it at all. But after watching that video I am confident that I got it! Thank you sir!

panospapadopoulos
Автор

honestly went through a lot of java not knowing what 'this' ment for a few months, thanks for explaining it to me

azus
Автор

Лучшее описание ключевого слова "this" во всей галактике :) Спасибо!

bennails
Автор

Great video, If anybody has issues with compiling the exact same file that is on the video you should check how public static void main(String[] args){} is written, since the author actually changed that to be correct on some moment of the video, but it's not obvious.

vitalyzubkov
Автор

Great way to explain. I was struggling to understand this concept for very long time. Now clear as water.

goswamm
Автор

why we just can not name differently from class variable name?

davidvilla
Автор

thank you sir, "this" tutorial is really awsm 😀😀👍👍👍

SmartProgramming
Автор

is awesome..i always had confusion about this keyword even after decent research but none was so satisfying as this...realy thanq so much..

druuu
Автор

Thanks dude! I finally understand the this Keyword after all these months! ♥

yamiben
Автор

very easy to understand, thanks you very much.

vuongphamquan
Автор

wth. this tutorial only makes me fully understand the this keyword. thanks to you,

justinherrera
Автор

this was damn confusing for me... this video really helped... thnku for

simarjitkaur
Автор

wow, very good, easy and helpful explanation, Thanks

vactum
Автор

But shouldn't that already be inherent in making object?


For example, if you make a class called Person with fields: name and age, each new instance is guaranteed to have their own variables for name and age.


So if you do


Person customer1 = new Person
Person customer2 = new Person


...


then


customer1.setData("Kyle", 18);
customer2.setData("Bob", 22);


then each object has their own fields filled up.


so if you do


customer1.showData() it should show Kyle 18
whereas if you did


customer2.showData() it should show Bob 22


That beginning, everything before the period, is the name of the object instance. Right? That indicates what data the showData method should be looking at. So if that's how objects work, I don't understand when and why we would use this.

kylex
Автор

How did you achieve the handwriting effect in the video. Please share

Syedhussainipage
Автор

Ahh, first impression is that you should probably be using tabs. Regardless, it is a great tutorial- thanks for making it!

anilmawji
Автор

***Correction***: public static void main(String[] args) /
args can be written as argument too (you can actually write it as anything eg.: abcd, placeholder, putWhateverWordYouWant, declare)

FLYAEROBOY
Автор

thank you! and also provide the user the option to view the video in full screen at your website

sharath