I've gotta say John, I am doing Java in Uni, and I have their book, and a few others, but your videos wipe the floor with them when it comes to clarity and explanations. Seriously, if you aren't a teacher, you should be one. I was disheartened when I was reading the course materials for my class, but just watching your videos has really helped with everything. Thank you very much indeed.
You make things look so much easier. I feel like I have watched perhaps an entire lecture after most (if not all) of your videos. And I mean that in the best possible way. Keep being great, you certainly have a gift in teaching!
I think that using "this" in class methods, like constructor or getters and setters, is not for avoid confusing between the function parameter and the filed name. The uses of "this" is for referencing the specific object in memory beacause we can have many other objects of the same class.
I've watched a bunch of your videos today just in two hours and I'm amazed of how you make things look so clear in just seven minutes or so per topic :D Great job!
Been going for about a year now! But the first bunch of videos were much rougher for sure, so you're probably not wrong that the last couple months had some of the best stuff so far. 🙂
The tenth grade board exams are comming up and i think that this was a pretty informative video. I really like the efforts put by Sir John who is also teaching us for free unlike most of the cases (tutions example) where they charge tons of money for basic concepts. The plus point is that he is a really great teacher too. Sir i hope that you will continue to do this.
Dang near perfect, and no, I don't have any complaint at all, except that in other languages some good developers felt that "this" was redundant in instance methods and should generally be avoided as noise (their approach was non-ideal when the natural name for a method parameter was the same as a data member, of course -- they would wind up having to munge those). On the theme of "I love how you do brief intros that don't overwhelm the learner with minor details without lying or teaching anything they will have to learn later" a very good book I am reading does just that. In a quest to prepare the reader for cert exams, they don't merely ignore stuff that isn't on the exam in that area, but actively make some misstatements that won't affect one's performance on the exam, but if you go beyond later, you will actively have to unlearn some "convenient lies" that they could have just ignored instead. It is a fine line, but you normally always land on the right side of it. There are extremely few "untrue statements" or "non-facts" found in your videos in service of making a good introduction. That is not easy to pull off, and I really appreciate it.
Your explanation of the "this" keyword is crystal clear. After being stuck at this point for such a long time, it finally makes sense to me. I am really grateful for your help! I am in my second year of college and right now, struggling in a java class highlighting algorithms and data structures. I have also checked some of your other videos and will certainly watch more! Thanks!
im in the same boat but i am building a calculator app and in the tutorial he used "this keyword in a different context. functionButtons[i].addActionListener(this);
Thanks! 🧙♂️ You may have seen it already, but I have another recent video with even more constructor info here: ruclips.net/video/pgBk8HC7jbU/видео.html
This is whole different level. I am working hard to get to this point where explaining concept is as easy as coidng with john currently explains thanks for your hard work we all really appreciate.
Your explanations have helped me fully wrap my head around these concepts that I have never been able to understand for years in my self-study. Thank you so much! I've subscribed since I'm going all-in on learning Java at this point and I really want to hone in on the basic concepts.
holy crap *this* actually makes sense now! I was trying to do something for a project in my comp sci class and couldn't figure out what I was doing wrong.(also apparently we were supposed to use "this." but it wasn't introduced until the next lesson which was stupid)
I work in C#, and I swear Java is basically the same language with a different API. I feel like I'll be referring to your videos a lot while working on my CS Java course, though, since Java is different enough to cause some confusion.
I see what you did there with the dog named Kramer and the Kramer poster in the back. BTW your explanations are super easy to understand compared to other videos. Amazing work.
I almost added a counter to the video to show every time I said the word "this", I thought it would be hilarious. But then I thought it might have been too distracting. So you all can turn it into a drinking game instead.
I'm so annoyed by the fact that here in Germany the government makes pupils use parameters prefixed with a 'p', which is why they'll never get in contact with the 'this' keyword, since there is never a conflict with the field names - I'll tell them, though, anyway. Your Dog constructor would therefore look like 'this': public Dog(String pName, int pAge). I think this is a relict from the time that the default language in higher education was Delphi and senior developers in the government didn't want to give up this parameter naming convention when they had to learn Java. Thanks again for the awesome content. I'll definitely recommend your videos to my students.
Hi John. How come we don’t just use a different parameter name instead of “name”. Wouldn’t that also avoid there being two “names” to be referred to? For example: public void setName(String nameSet) { name = nameSet; }
You're absolutely right, that would do the trick too! I suppose programmers are kind of a stubborn bunch and we don't want to use another name for something if we don't have to. I don't have much of a better explanation unfortunately, but the convention you'll see used is still to use the same names with "this".
"this" is a reference to a current object. I'm suprised that author can't show a simple example when usage of "this" is necessary. One of the examples could be a method for class Node like: void add(Node aNode){ aNode.next=next; next.prev=aNode; next=aNode; aNode.prev=this; } Here Node is a node of double linked list. This method adds aNode right after current(or "this") Node in list. And it can't be done without "this".
Currently Iam in the first year of systems engineering and we have to learn java but with bluej, but bluej sometimes sucks, there are many features like markings in eclipse and other editors that bluej doesnt have.
In short - yes! If I didn't I wouldn't be trying to put a RUclips channel together about it or doing it for my career. It's one of the most popular programming languages in the world, with tons of applications written in it, and tons of companies looking for people to build and maintain those applications. It's not going anywhere anytime soon.
I've gotta say John, I am doing Java in Uni, and I have their book, and a few others, but your videos wipe the floor with them when it comes to clarity and explanations.
Seriously, if you aren't a teacher, you should be one.
I was disheartened when I was reading the course materials for my class, but just watching your videos has really helped with everything.
Thank you very much indeed.
Your channel single handedly allowed me to pass my intro to java course. Went from failing to a 3.0.
Thank you!
You make things look so much easier. I feel like I have watched perhaps an entire lecture after most (if not all) of your videos.
And I mean that in the best possible way. Keep being great, you certainly have a gift in teaching!
YES!!!
this keyword was so confusing to me as a beginner- more than most other concepts!!-video really nails it down, and helps reinforce my understanding
Why is this guy so helpful, so much clarity & speed in teaching 😭😭😭😭
I am a beginner, so I guess it will take sometime to thoroughly grasp all at once.
Thanks for the explanation man!!
Thank you John! I’m a sophomore Software Engineer, and you explain things much clearer than my professor ✨
@@jamesdrinkard687 what do you think assignments are in school? also, you think john never went to school? you sound like you're coping a bit.
You explain it better than anyone, bc you inform us what we need to know NOT what you know.
I am just learning Java (from mechanical engineering, career switch) and your videos are great.
Keep it up and Thank you !
Awesome, good luck on the career switch!
I think that using "this" in class methods, like constructor or getters and setters, is not for avoid confusing between the function parameter and the filed name.
The uses of "this" is for referencing the specific object in memory beacause we can have many other objects of the same class.
I've watched a bunch of your videos today just in two hours and I'm amazed of how you make things look so clear in just seven minutes or so per topic :D Great job!
This was a great explanation of the "this" keyword, thank you so much!
Plz keep doing this in just a couple months you’ve provided so much value
Been going for about a year now! But the first bunch of videos were much rougher for sure, so you're probably not wrong that the last couple months had some of the best stuff so far. 🙂
Best explaination on "this" keyword i have ever seen so far on Yt!!! Thanks a lot man🙏🙏🙏🙏🙏🙏
grabe ka na johnny, you really know a lot of work, legend
The tenth grade board exams are comming up and i think that this was a pretty informative video.
I really like the efforts put by Sir John who is also teaching us for free unlike most of the cases (tutions example) where they charge tons of money for basic concepts.
The plus point is that he is a really great teacher too.
Sir i hope that you will continue to do this.
The explanation is insanely clear! Saved me from another course tbh
Omg been fighting with Intellij to understand getters, setters and constructors and watching This was an instant 4 piece! Thank you!!!
Thank you! I'm so appreciative of this that I'll watch the ad in its entirety so you can get some of the money!
Dang near perfect, and no, I don't have any complaint at all, except that in other languages some good developers felt that "this" was redundant in instance methods and should generally be avoided as noise (their approach was non-ideal when the natural name for a method parameter was the same as a data member, of course -- they would wind up having to munge those). On the theme of "I love how you do brief intros that don't overwhelm the learner with minor details without lying or teaching anything they will have to learn later" a very good book I am reading does just that. In a quest to prepare the reader for cert exams, they don't merely ignore stuff that isn't on the exam in that area, but actively make some misstatements that won't affect one's performance on the exam, but if you go beyond later, you will actively have to unlearn some "convenient lies" that they could have just ignored instead. It is a fine line, but you normally always land on the right side of it. There are extremely few "untrue statements" or "non-facts" found in your videos in service of making a good introduction. That is not easy to pull off, and I really appreciate it.
Thanks jvsnyc!
Your explanation of the "this" keyword is crystal clear. After being stuck at this point for such a long time, it finally makes sense to me. I am really grateful for your help! I am in my second year of college and right now, struggling in a java class highlighting algorithms and data structures. I have also checked some of your other videos and will certainly watch more! Thanks!
im in the same boat but i am building a calculator app and in the tutorial he used "this keyword in a different context.
functionButtons[i].addActionListener(this);
Youre a f*cking magician John, i literally thought about refreshing my java constructor knowledge when you uploaded this video
Thanks! 🧙♂️
You may have seen it already, but I have another recent video with even more constructor info here: ruclips.net/video/pgBk8HC7jbU/видео.html
This is whole different level.
I am working hard to get to this point where explaining concept is as easy as coidng with john currently explains
thanks for your hard work
we all really appreciate.
Wow, I wasn't expecting to learn anything but now I understand it much better. I didn't even know you could call a constructor in that way.
Your channel is fantastic. Please don't stop
probably the best "this" keyword tutorial I've come across... and I've watched a ton. Thanks!
your the best teacher ive ever had, thank you
Your explanations have helped me fully wrap my head around these concepts that I have never been able to understand for years in my self-study. Thank you so much! I've subscribed since I'm going all-in on learning Java at this point and I really want to hone in on the basic concepts.
Great tutorials! Right length, right content and great attitude!
thank you john. I got my concept clear. was confused in class.
You're saving my Java studies. I am really grateful for your classes !
ong, he is crystal clear with what he explains and many times he answers questions I've been wondering about for quite some time
holy crap *this* actually makes sense now! I was trying to do something for a project in my comp sci class and couldn't figure out what I was doing wrong.(also apparently we were supposed to use "this." but it wasn't introduced until the next lesson which was stupid)
The best explanation i've ever seen !!! thank you alot John! keep up the hard work
Thank you so much for teaching this
Very clear, thanks a lot!
Far better than the course i've paid good money for :) - Thanks very much!
His videos are so cracked. It's so beginner friendly.
I'm just impressed by the way you explain Everything! Excellent job!
Very well explained, thank you!
I work in C#, and I swear Java is basically the same language with a different API.
I feel like I'll be referring to your videos a lot while working on my CS Java course, though, since Java is different enough to cause some confusion.
It is very good. You speak very good. I understand almost everything 95 %.
Thank you.
I am learning java and this helps me a lot , thank you so much John
this definitely helped me, im 11 weeks in my java cs class and needed to understand what the hell was going on with these constructors XD
you give answer for every why I ask myself. Thanks
1. This video was AWESOME!
2. Even more awesome, John listens to Rush! (R.I.P. Neil Ellwood Peart)
Clear, pleasant, and understandable. Thank you!
This is wonderful, I finally understand how this works!
Really clear explanation, thank you so much!
Keep doing great job, John. Thanks to you i can progress Helsinky MooC course like walk in a park.
Awesome! And thanks!
I don't know how you make things this simple, suddenly I just understand it and idk how lol
I see what you did there with the dog named Kramer and the Kramer poster in the back. BTW your explanations are super easy to understand compared to other videos. Amazing work.
Thank you so much for THIS video.
I almost added a counter to the video to show every time I said the word "this", I thought it would be hilarious. But then I thought it might have been too distracting. So you all can turn it into a drinking game instead.
You are thee greatest explainer ever 🙂 thank uu
you are an amazing instructor
Excellent video, very clearly explained, also cool vibe. 10 out of 10. Thank you very much!
Thank you so much! This video completely made sense out of it.
Perfectly it was explained Looking forward to next your video reference type and primitive type CASTING
I'm so annoyed by the fact that here in Germany the government makes pupils use parameters prefixed with a 'p', which is why they'll never get in contact with the 'this' keyword, since there is never a conflict with the field names - I'll tell them, though, anyway. Your Dog constructor would therefore look like 'this': public Dog(String pName, int pAge).
I think this is a relict from the time that the default language in higher education was Delphi and senior developers in the government didn't want to give up this parameter naming convention when they had to learn Java.
Thanks again for the awesome content. I'll definitely recommend your videos to my students.
THank you soooo much! Please continue creating your videos!!
Great video, the subject is so clearly explained. Amazing explanation, Thanks!!!
Great explanation! Thank you. I am looking forward to next videos
Finally understood this, thank u so much
your videos are really helpful... much love from brasil!
this should be the first line in the constructor is the new thing i have learnt.
Magnificent explanation as always. I got your bootcamp course at your web page
Great explanation. Addicted to your channel. Thanks for such a simple explanation
Thank you. It was really clear. Good luck...
Absolutely terrific videos!
Good video! Helped me a lot.
Thanks a lot for your videos, they have been a godsend!
Doug Demuro loves this keyword
I feel like this is a dumb question, but why not just change the names of the method parameters? Wouldn't that remove the need for the 'this' keyword?
Point to note
This keyword can also be used to call other parameterized constructor
Which will be the first statment
no cap you teach better than my triple PHD professor from a top 30 university in the world
Thank you so much, it really helped
Thank-you John!
These vids are gold ty!
My hope is you explain in details the differences between method and constructor, and the purposes
Really great videos, thanks!
Great! ❤️
I always watch your videos
Thanks for watching, glad you enjoy them!
John, are you a drummer? Just looking at your kit in the background. Thanks as always for the great videos.
Thanks for this, except @4.38 - "point of a static method is that they CAN NOT be used"
Hi John.
How come we don’t just use a different parameter name instead of “name”. Wouldn’t that also avoid there being two “names” to be referred to? For example:
public void setName(String nameSet) {
name = nameSet;
}
You're absolutely right, that would do the trick too! I suppose programmers are kind of a stubborn bunch and we don't want to use another name for something if we don't have to. I don't have much of a better explanation unfortunately, but the convention you'll see used is still to use the same names with "this".
@@CodingWithJohn alright! Thank you for explaining that.
"this" is a reference to a current object. I'm suprised that author can't show a simple example when usage of "this" is necessary. One of the examples could be a method for class Node like:
void add(Node aNode){
aNode.next=next;
next.prev=aNode;
next=aNode;
aNode.prev=this;
}
Here Node is a node of double linked list. This method adds aNode right after current(or "this") Node in list. And it can't be done without "this".
great video thank you so much
There's a new Java Sheriff in town!
ur a god!!! help me soooo much thank you so much
Make a video about creating a server and client with java pls !!!!!!!!! THANK U FOR ALL UR VIDEOS
Thank you so much!
I love all your videos! never stop making them!
Currently Iam in the first year of systems engineering and we have to learn java but with bluej, but bluej sometimes sucks, there are many features like markings in eclipse and other editors that bluej doesnt have.
USE WHAT?!?!?!?!?!
This
I think he's talking about the drums
It might have something to do with that
You are amazing! Thanksss
thank you so much, i was struggling with this "this" hahahahaha
i need you as my personal teacher
just helped me thanks
This was a great explanation of the "this" keyword
Thank you again :)
Useful!
Great stuff
May I get your opinion about java ?. Do you think java will still stand out 2 years from now?
In short - yes! If I didn't I wouldn't be trying to put a RUclips channel together about it or doing it for my career. It's one of the most popular programming languages in the world, with tons of applications written in it, and tons of companies looking for people to build and maintain those applications. It's not going anywhere anytime soon.
Millions of Java lines are written every day. Java is long past the point where a language is allowed to die, ever.