3:05 THANK GOD finally someone explained this in few seconds instead of paragraphs
@dapro34953 жыл бұрын
yep right i always wondering what "this" actually means
@jonker50963 жыл бұрын
I just wanted to agree with everyone here; this is way better than anything my school has showed me for this subject. I no longer have any confusion or questions and I understand why you would want to use this method (I initially thought my school was just making things harder for no reason). Thank you :)
@ezramukisa3762 жыл бұрын
Wow, imagine. I'm at uni but it has never been as easy to understand as this 8 minute video. This deserves a million subscribers 🙌
@zukiezuke2 жыл бұрын
I spent a while searching and this is the best AND most straightforward explanation out there I could see. Thank you so much, I feel like I actually get it when at this point I was willing to settle for someone just telling me what to do.
@MehranHosseini-po9eg5 жыл бұрын
what a really good point you mention that freed my mind and it was Setter should be before Getters, cause it makes more scenes in this form. Btw I'm aware it's not really that important to cause a problem if in reverse but for learning purpose it's better in this way
@rudiminnaar37005 жыл бұрын
Perfect video for learning or doing quick revision. Thanks Chandler!
@omarkurdi93813 жыл бұрын
I literally can't thank you enough i watched all the you tube vids about learning java setters and getters and yours is the best one i understood the use of them finally thanks alot
@minyoi68434 жыл бұрын
Thanks a million. Most video go back and forth I couldn't really understand. This is the first time I've understood getters and setters.
@MrChester1972 жыл бұрын
I just found your channel by searching this topic. You have explained this so much better than anyone else, including my professor. I also learned about the generate feature on IntelliJ and my mind is blown. thank you SO MUCH.
@habibazarsina58574 жыл бұрын
Thanks, Chandler. You are a great teacher/tutor. After watching your video I have a better understanding of setters and getters in Java.
@jameskerester20004 жыл бұрын
At 3:06 isn't the instance variable the one on the left? So if you weren't using this.name = name it would be name = Name right?
@abdelwadoud10408 ай бұрын
you are right
@maurosgarage5 жыл бұрын
Thank you!!!!! I wrote 157 lines of code to do what you did in 10 line of code #overthinking
@anidh15035 жыл бұрын
Simple and well explained, thanks for the vid
@taylorsmith54615 жыл бұрын
Such a well done video! I'm thankful that you did the getters and setters the way you did because I finally understand them better. Everything is well explained. Keep up the great work!
@SuperDaxos5 жыл бұрын
I'm in school and yesterday my teacher was explaining a course that also contained getters and setters, and I didn't understand sh*t. In these 8 minutes of your video, I'm like: holy cow, this is actually really easy. I just needed someone to explain it well and take it slow
@markellis1305 жыл бұрын
Great video! This was much easier to understand than my textbook.
@tharakhgormaniad98202 жыл бұрын
THANK U SO MUCH!!! THIS IS WHAT I NEEDED A SIMPLE AND CLEAR EXPLANATION U SAVED MY LIFE
@brandontaylor83725 жыл бұрын
You described this way better than my professor. Thank you!
@omarkurdi93813 жыл бұрын
dude same i didn't understand a word from my professor
@anedz40055 жыл бұрын
thanks, my teacher wasnt able to explain it to me but you did a great a job and now I understand it thanks a lot!
@adrianlowery71752 жыл бұрын
THANK YOU for explaining the concept so simply. That is what makes a great teacher. And thank you for showing shortcuts! I had no idea that IntelliJ would generate getters and setters.
@sheed4192 жыл бұрын
WOW!!! I was having problems with getters and setters until I came across this video... thanks girl!!!!
@DeepakSingh-n2g Жыл бұрын
What’s the point of having private variable but both getter and setter be public?
@K4113B41134 жыл бұрын
You actually explained stuff as you did it. Amazing. My teacher can’t even do that. Subscribed.
@1sunflower20054 жыл бұрын
@3:03 Name = name??? should it be name = Name?
@TurdFurgeson2754 жыл бұрын
Couldn’t have hurt you to watch 5 seconds more.
@user-uq1fq6gs3i4 жыл бұрын
@@TurdFurgeson275 No he is actually correct
@SwinkMediaHouse7 ай бұрын
Love the if-else outro... subbed!
@trymstmo51583 жыл бұрын
Thank god, finally someone thats actullay are good at this. Thanks!
@hudsonsmith3 Жыл бұрын
I’m in ap csa, and for too long I have not understood this at all. Thank you so much!
@milankbudha4 жыл бұрын
good video..u were the 1st person to show the video in intellij ide....everyone does in eclipse
@bismahnawaz8524 жыл бұрын
Hi at 5:00 you said that you could test it on the person class, how would you do that?
@ditavoncheese16805 жыл бұрын
I didn't find the music distracting at all, it was quiet and peaceful. I was still able to focus on the tutorial.
@fkjgbrbr6 жыл бұрын
3:05 may have them backwards. You would be changing the value of the parameter rather than the instance variable.
@crazyx3s5 жыл бұрын
I think she meant that the parameter is set to the instance variable. It was just bad wording.
@bernardasigbe58475 жыл бұрын
Yea. I was scrolling through the comments section to see if someone noticed that. Thanks @WeHungry. But in all, it's great explanation. Way to go Chandler!
@ahmedifhaam72662 жыл бұрын
yea its Kinda backwards. She explained how to use "this" keyword correctly, but after removing "this", she renamed the wrong variable.
@brijkumar82073 жыл бұрын
Hello great explanation. Do you have Java class?
@olzhaskrm26282 жыл бұрын
Hi CodingWithChandler, at 3:01 you said if we change name to Name it will be Name = name, however, if I understand correctly left side where is this.name related to private String name, and right side is what coming from method's parameter /argument. Please correct me if I'm wrong,
@afennelly995 жыл бұрын
Why are there no setters and getters in the class for FavColor?
@Michelle-qw9qq3 жыл бұрын
This is amazing! Thank you for breaking it all down I was definitely making things harder for myself lol.
@magoyama4 жыл бұрын
that's a pity that the left border of the screen is slightly hidden, but your explanation is great, thank you!
@ZiadSpell3 жыл бұрын
Perfect explanation ✔️
@ADtranzakias4 жыл бұрын
Very simple and understandable. Thank you very much Chandler, see you in friends.
@DMV_Helal5 жыл бұрын
Thanks so clear to understand :)
@lestercarcamo40702 жыл бұрын
Excellent. This is very good.
@melanie555557 ай бұрын
LIFESAVER. THANK YOU!!!
@oki9Sedo13 жыл бұрын
Thank you for this! Very clear.
@merial81665 жыл бұрын
Very accurate and detailed explanation! Thank you!
@ramonsufranterecia7075 Жыл бұрын
You are amazing, you just make it look so easy 🎉 thanks 🎉😅
@KY22077 Жыл бұрын
Thank you for such a good explanation. Please make videos about Design Patterns.
@lishebolishebo28013 жыл бұрын
Well explained. Thank you.
@chaseblodgett57453 жыл бұрын
Thank you!! Very well explained
@soulaimanov5 жыл бұрын
What a beautiful explanation thank you for making things easy 🙏
@hewhomustnotbenamed36623 жыл бұрын
Thank you so much! So understandable and clear!
@mrg39214 жыл бұрын
Thanks a lot! Keep up the good work!
@RinorBislimi5 жыл бұрын
One of the best explained video :Y
@anodosarcade73555 жыл бұрын
3:26 so that variable is now that name for that variable to anything that references it, or just a instance of an object?
@edwamk5 жыл бұрын
Amazing Demo
@angelryux5 жыл бұрын
I finally get it now lol but I still not sure why we wouldn't just change the variables to whatever we want it to be instead of writing all that. Like just declare and assign them like: String Name = "Bob"; String Color = "Blue" ; int age = 16; And just call 'em?
@crazyx3s5 жыл бұрын
I recommend you to watch 2 -3 videos on each topic you go over that way you can understand it in different angles This video explains it nicely: kzbin.info/www/bejne/hXeWp3WPjM6ej9U imagine you have thousands of methods and you need to change a value of a variable many months later but you forget the rules or conditions of a certain variable thats why through the setter you can change a value, with the condition, and through the getter you simply just return the value.
@kavin18145 жыл бұрын
What if you wanna assign/change values & print the values of these variables from different class? Imagine that Scenario.
@ahmedifhaam72662 жыл бұрын
At around 3:17 I don't think your example of using 'this' keyword in java was entirely correct. Thought I'd point that out. Thanks
@mackymichel80524 жыл бұрын
Thank for this lesson, but what if I wanted to include constructors( both of them), how would I define them?
@hossamqandel53033 жыл бұрын
Thank u Chandler ❤️🦅
@nitish28083 жыл бұрын
How do I access a protected getter setter in another package in Java?
@petevegas32745 жыл бұрын
Great video and explanation!
@belgianheskey2 жыл бұрын
So this is so the file(class) can access the variables from the other file?
@bobert4713 жыл бұрын
So it's pretty much like creating helper functions similar to JavaScript and Node.js if I were building an API and had to get and set data. Really just helper functions right?
@Ozay19984 жыл бұрын
wow i finally understood it. thank you
@ThaThree5 жыл бұрын
Hi Chandler, everything works wonderfully except for the fact that I cannot input Bob's variables like you have, instead I have to put it in the brackets of "new Person(Insert variables here)". IntelliJ won't let me have it your way, why is that? I can see you're using the same IDE
@czciborczyz61926 жыл бұрын
Simple and Effective expleind , Thanks ;)
@betheBetterChoice4 жыл бұрын
thanks well explained and nice voice too!!
@aferezek77815 жыл бұрын
so what is the difference between constructor and setters
@anodosarcade73555 жыл бұрын
I had trouble understanding what exactly TAKES IN variables in a paremeter, from inside the method or from the declared variables above. or from the other class that is using the getters and setters. I think im getting it now....
@jeremiedimarciello5025 жыл бұрын
Does that info stay in the object? I could save the object close program..re open then getname and it still be bob?
@Matt-qr8yu3 жыл бұрын
you are a savior
@srinivasseenu18933 жыл бұрын
can this be done in a single code
@SAM-ol5ip2 жыл бұрын
I hate how in uni they make this so hard while in reality it's not! thanks A LOT
@bluesp62674 жыл бұрын
Thank u. Really helpful
@sherylen.21692 жыл бұрын
thankyou so much!😚
@alldayjose6 жыл бұрын
this was a bit helpful. thanks
@ayushlohariwal99045 жыл бұрын
I'm from India. Thank for making these videos. You helped me a lot. Love the way you describe coding. 😎 please make more videos on spring or hibernate.
@yasirzafar80754 жыл бұрын
Youre a life saver!
@aquate96374 жыл бұрын
I don't get it, why not just make separate variables and then define them instead of just using setters and getters?
@davidhamilton98714 жыл бұрын
awesome thank you
@kay67302 жыл бұрын
did not see properties, only fields why ?
@4max0 Жыл бұрын
Thank you so much. :)
@dronef04153 жыл бұрын
This is basically string concatenation but with extra steps
@JP-programming Жыл бұрын
Good job
@kidsin95 жыл бұрын
Great thanks
@FireRust5 жыл бұрын
i cant focus with the music... either talk louder or turn the music down please! :(
@cmh11985 жыл бұрын
name of the song please?!
@fayoztoshmirzaev78958 ай бұрын
Be honest who is BOB?! but actually thank you for the video
@xxmarksmanriflegodxx2071 Жыл бұрын
3:03 this is not correct my guy, its has to be opposite if your paramter is Name and instance variable is name you would have to write name=Name;
@DhiaaAl-amdy3 ай бұрын
provocative AF
@anodosarcade73555 жыл бұрын
"intelliga can do that for you" interesting interesting....tell me more
@Jaylink155 жыл бұрын
IntelliJ
@pasindurangana6435 жыл бұрын
thank you
@dragutindjokovic5 жыл бұрын
Great!
@peterkim96963 жыл бұрын
Nice.
@pleasures69094 жыл бұрын
Thanks. :)
@aubreyanderson48635 жыл бұрын
cramming for a quiz wish me luck
@mukwevho013 жыл бұрын
i love that you are a female. finally. I've been getting only male tutors and its nice to get some feminine energy
@busarapumanikrishna49694 жыл бұрын
Ur voice tone is quite different
@Morphues4 жыл бұрын
thank u
@mariomartinez29395 жыл бұрын
Couldn't subscribe because the code you wrote asking to subscribe failed to compile. #braces
@seemarani-sk3et4 жыл бұрын
liked what you wrote at 8.21 but you forgot to close the else bracket , and hence lame one's will get error #lostYourSubscribers , lol
@kashif23095 жыл бұрын
Thank you! no offense but why would someone put a piece of distracting music in an educational video.