Getters and Setters Java Tutorial #84

  Рет қаралды 499,698

Alex Lee

Alex Lee

Күн бұрын

Пікірлер: 435
@alexlorenlee
@alexlorenlee 11 ай бұрын
If you’re new to programming but want a career in tech, I HIGHLY RECOMMEND applying to one of Springboard’s online coding bootcamps (use code ALEXLEE for $1,000 off): bit.ly/3HX970h
@magicvibrations5180
@magicvibrations5180 4 жыл бұрын
My professor is useless. Thank you for this video, I needed it.
@4seth
@4seth 3 жыл бұрын
It's not always that they are useless, but the curriculum puts constraints on how effective of teachers they can be.
3 жыл бұрын
Exactly. My course is teaching me the same thing in 4 hours and I don't get it at the end of it plus feeling like a stupid. And he literally teach perfectly in 15 minutes. I don't know what else to say.
@thejamericanexperience2757
@thejamericanexperience2757 3 жыл бұрын
University is mainly for profit.
@magicvibrations5180
@magicvibrations5180 3 жыл бұрын
@@thejamericanexperience2757 Depends on the university
@mealsville
@mealsville 2 жыл бұрын
wouldn't agree more 😤
@soar01
@soar01 4 жыл бұрын
Alex, please continue doing these tutorials. It helps me, and I'm sure a lot of others who want to extend their knowledge of Java.
@Sir_Sammi
@Sir_Sammi 4 жыл бұрын
Just did my java final earlier this week, definitely would of failed without your videos, thanks for your good work!
@SubZeRoy9
@SubZeRoy9 3 жыл бұрын
Nice I did mine Monday. Alot better now that it's summer I feel like I'm going to learn alot more just doing my own stuff and making projects for fun. School has a way of sucking all the fun out of anything interesting. Lol
@eliasmore7500
@eliasmore7500 2 жыл бұрын
Would've
@hassansyed6087
@hassansyed6087 Жыл бұрын
What kind of example questions did you encounter? Could you show us 1 or 2? Just to see what they ask in a java exam =D
@derroz3157
@derroz3157 Жыл бұрын
its not work its a work of art you troll
@melodyosterholm3515
@melodyosterholm3515 4 жыл бұрын
This man has just saved my schooling career!!
@karaunderwood5821
@karaunderwood5821 3 жыл бұрын
Alex, your videos are incredibly helpful. You have a real knack for explaining confusing concepts in an extremely understandable and simple way. Thank you!
@aa_2054
@aa_2054 4 жыл бұрын
I've watched hours of tutorials on KZbin but this one just clicked with me! Great job, good teacher 👍
@dankBenk
@dankBenk 7 ай бұрын
You explained in 5 minutes what my professor couldn’t explain in 2 weeks, well done!
@jackiegura8161
@jackiegura8161 3 жыл бұрын
I havent seen any other tutorials that explain step by step of what you are doing and why. Thank you!! Youre the besttt
@AzgarthX
@AzgarthX 3 жыл бұрын
not that I didn't understand what setters and getters are for but I'm glad your youtube channel exists cause my java II professor barely teaches like this at all. Just gives us reading assignments and you basically gotta teach yourself the material
@minhhuynh2646
@minhhuynh2646 4 жыл бұрын
Thank you! I have been writing get, set for a month without knowing why and when to use lol. Thanks a lot
@teachernewteacher1944
@teachernewteacher1944 4 жыл бұрын
Alex. You are so humble person. Great and easy explanations of all topics. Please give more exsamples for oop concepts, array, collections. (You may give exsamples from real life). I recommend you to my friends they are very glad to watch you. Respect. You do such a great job.
@thomasedwards7538
@thomasedwards7538 3 жыл бұрын
your videos are really helping me get through my university programming classes, thank you.
@beyond_akshii
@beyond_akshii 2 жыл бұрын
i was so confused about the 'this' parameter but now i know ..........thank you alex for the precise info...love love
@ShadyChild12
@ShadyChild12 4 жыл бұрын
Getters/setters also allow you to perform actions on the input before setting/getting the variable, for example, you could change the setName to this.name = name.toUpperCase(); This will set the variable to all caps. Getters/setters are very powerful when used correctly!
@matheusvarani303
@matheusvarani303 6 ай бұрын
cool, didnt know we could use .toUpperCase() with set, thankss
@koushikghosh7048
@koushikghosh7048 2 жыл бұрын
That trick using Eclipse to generate the getters and setters was really neat!! Thank you!
@WisomofHal
@WisomofHal 4 жыл бұрын
When my professor introduced our getters/setters lecture, I thought this was about to be a deep lecture in OOP theory. Come to learn, it was all about creating instance methods to return the state of an object or implement some action on it's state within a client program. I wanted to leave after 5 minutes. I'll say though, I'm glad you've gone over this and I think your video is about the right amount of time for any student to understand these fundamental concepts.
@matthewerwine8333
@matthewerwine8333 4 жыл бұрын
I learned all of this through CS Awesome, but your vids had definitely clarified the details of java code and I thank you so much for it
@umamaheshiyer5664
@umamaheshiyer5664 2 жыл бұрын
Alex I have watched many videos however you are the best !
@armigeddon4451
@armigeddon4451 4 жыл бұрын
THANK YOU SO MUCH! you're so much better than my current professor in university (no offense to him but I got so frustrated that I didn't get what he said because he keeps over complicating and over explaining his lessons that I got confused) but this is all the lesson had to say ;-;
@rin3005
@rin3005 Жыл бұрын
Okay since today you're my favorite kind person on earth 💐
@hesham4744
@hesham4744 2 жыл бұрын
thank u i was a bit lazy to study but after i saw your vid
@ezrabehr4205
@ezrabehr4205 3 жыл бұрын
wow! you explain it so well! you are definitely a keeper! looking forward to learning more from you!
@blouberguy4647
@blouberguy4647 Жыл бұрын
amazing explaination and also very fast thank you for this!
@kennethcabarles4948
@kennethcabarles4948 2 жыл бұрын
Thanks for this! I've been able to complete my Performance Task. I appreciate you sir!
@9chickenwingz
@9chickenwingz 2 жыл бұрын
Alex, you’re the teacher we needed! 👏🏽
@rmkkmrrmk
@rmkkmrrmk 4 жыл бұрын
Excellent. Thank you Alex.
@alexlorenlee
@alexlorenlee 4 жыл бұрын
No problem! :)
@sadafharoon3495
@sadafharoon3495 4 жыл бұрын
you explained it in so simple and easy way. Perfect. Thank you
@charlitolauronlapuz3879
@charlitolauronlapuz3879 3 жыл бұрын
your KZbin videos is the best Sir.. keep safe
@DivingChipmunk
@DivingChipmunk 4 жыл бұрын
Just learned this in my AP comp sci course, nice vid
@alexlorenlee
@alexlorenlee 4 жыл бұрын
Nice :)
@rosemarynyambura-n5n
@rosemarynyambura-n5n Жыл бұрын
am very very much impressed by this am 18 yrs of age thumb up for good work thanks a lo
@siphozimba1241
@siphozimba1241 4 жыл бұрын
You are such a champion thanks a lot man
@nguyenkarma564
@nguyenkarma564 2 жыл бұрын
Thank you so much Alex. The best wish for you bro
@flormercado3587
@flormercado3587 2 жыл бұрын
Thank you so much for your tutorials. You explain the concepts really well. Excellent work!
@jesrealibabao6235
@jesrealibabao6235 3 жыл бұрын
No exaggeration, you really helped me a lot🤗
@Imluisx
@Imluisx 4 жыл бұрын
You make java extremely simple without over complicating it! Appreciate the videos man!
@KellyBlackwell
@KellyBlackwell 3 жыл бұрын
**Alex -- this was so much easier to follow than my own instructor, thank you! The only thing I'd like is a little slower on the ending code walk through and if you had a highlighter pointer to see where you are talking about, that would be even better! Really great though! ** Does anyone have the shortcut or plugin for Notepad ++ for the System.out.println(); ? I tried installing the QuickText plugin but I can't get it to work. We will be moving over to Eclipse soon, but we are in Notepad++ right now and it's so annoying to have to keep writing out the print method.
@dennis_p
@dennis_p Жыл бұрын
Funny how simple you have explained this. In my own language reading it from a study book it didn’t make any sense to me.. 😅👍
@CosmonautCoding
@CosmonautCoding 3 жыл бұрын
These videos are life savers!
@zahoor.77
@zahoor.77 11 ай бұрын
Thank you. Your videos are beneficial! Grateful🙏
@eliaspfeffer
@eliaspfeffer 3 жыл бұрын
Helped a lot! Thanks!
@skyeslattery8214
@skyeslattery8214 2 жыл бұрын
Thank you, great explanation
@lonewolf3623
@lonewolf3623 4 жыл бұрын
Can you make a tutorial on abstract classes and interfaces
@youareiamurim
@youareiamurim 4 жыл бұрын
Great video again!! 😊👍 But i wonder if you, in the future can make seperate class files for the methods etc...since that is actually how the program has to be stuctured. But by all means, love you videos!!❤
@deli5777
@deli5777 2 жыл бұрын
Haha, I've gone through this before but I actually got it this time. Actually was watching more to verify this time. Before, I had the getter backwards, thinking that getter got the value from user then passed it to the setter... which didn't make much sense haha
@youneschoukri1184
@youneschoukri1184 3 жыл бұрын
Great video! Thank you so much for this tutorial!
@WhoHasSoul
@WhoHasSoul 3 жыл бұрын
I appreciate your work! Thank you!
@blisscrazyfangirl
@blisscrazyfangirl 3 жыл бұрын
Thanks Alex! appreciate it.
@JapanTravelShorts
@JapanTravelShorts 3 жыл бұрын
You are better than my prof. !
@nostalgicbitxh817
@nostalgicbitxh817 2 жыл бұрын
u r a life saver
@chocovanilla9738
@chocovanilla9738 3 жыл бұрын
This video really helpful! Thanks a lot!
@rutgerCJ
@rutgerCJ 4 жыл бұрын
I cried when you presented the sourcing option for setter and getters loooool, JDKs ftw!
@zarlorin3728
@zarlorin3728 4 жыл бұрын
Wow! I'll have my first exam in computer science this monday... hope this goes well :D
@dennyr.9865
@dennyr.9865 4 жыл бұрын
Great teaching.
@sourceOfJoy21
@sourceOfJoy21 4 жыл бұрын
Alex God bless you man
@NisanurKorkmaz-q2i
@NisanurKorkmaz-q2i 16 күн бұрын
Hi, thank you for all your videos you helped me a lot. I have just a question. Can you do a video about RegEx pls, it's so confusing and you explain too good so it'll a pleasure to watch it. On this have good day I hope you see that message.
@Applestaffman
@Applestaffman 2 жыл бұрын
aswesome explanantion for setter and getter!!
@ChronClockt
@ChronClockt 3 жыл бұрын
honestly you realy help me out with these videos tysm
@greenworld8963
@greenworld8963 4 жыл бұрын
Great teacher
@stonyheals3843
@stonyheals3843 3 жыл бұрын
Thank you man
@ericamuhammad5082
@ericamuhammad5082 2 жыл бұрын
Thank you!
@youdo3720
@youdo3720 4 жыл бұрын
Hello Alex, could you make a tutorial wherein the program will ask the user for input like Name and Age as well then use those inputs and manipulate them using getters and setters. Please:)
@christianek.963
@christianek.963 3 жыл бұрын
I have recently started to learn Java and when I saw him get excited by generating the getters and setters my heart skipped a beatt cause I'm used to that, but it's so cute when you see people get excited about things you already know or have. It makes me think of elderly who are surprised by all the new technologies
@davidm3614
@davidm3614 2 жыл бұрын
He already knew about it lol. He was just excited to tell us about it because its a great shortcut for beginners, not because he just learned it.
@orestdymarchuk2910
@orestdymarchuk2910 2 жыл бұрын
Thank you, Alex! You're very helping me with Java! With love from Ukraine ❤️🇺🇦❤️🇺🇦❤️🇺🇦
@dicksonthedeveloper6226
@dicksonthedeveloper6226 4 жыл бұрын
Great video!
@merhawitteshale
@merhawitteshale 4 жыл бұрын
amazing tutorials! i love em all.
@kbt4115
@kbt4115 3 жыл бұрын
@Alex Lee All schools should have to pay a small dividend to you for students that passed their classes, but only did so because they watched your videos. You are a Java programming wizard in my book my man! Thanks for also stepping through how the compiler runs through the code. That really helped hit it home and tied it all together.
@jj-fe6hz
@jj-fe6hz 3 жыл бұрын
bruh, this video explained "this' better than any of the other 10-20min videos out there specifically trying to explain "this". THANK YOU
@tofudelivery9999
@tofudelivery9999 3 жыл бұрын
Thank you
@ozzDeveveloperOpenForWork
@ozzDeveveloperOpenForWork 4 жыл бұрын
you can do sout and control+space
@cmarkel
@cmarkel 3 жыл бұрын
Hey Alex, why can't my professor explain this stuff as well as you can? I can't even follow his videos. Also, yours are much more interesting! THANK YOU!
@ndagubannaemeka9515
@ndagubannaemeka9515 4 жыл бұрын
I literally have a test on this on Saturday
@amoor012
@amoor012 4 жыл бұрын
13:18 If you are using NetBeans click (Alt + Ins) >> If you are using a LapTop like me, you will find (Ins) in the numbers pad on your right-hand side.
@chocovanilla9738
@chocovanilla9738 3 жыл бұрын
Thank you bro!
@khareek2453
@khareek2453 4 жыл бұрын
Perfect explanations, easy to follow along. I can watch several of your videos and not get bored for even a second ❤
@mdkokakhoka124
@mdkokakhoka124 4 жыл бұрын
Can you please make a video about robustness and exepction handling? 🙏
@masonmartin1464
@masonmartin1464 4 жыл бұрын
you're amazing man!
@hugo-garcia
@hugo-garcia 2 жыл бұрын
Getter and setter is one the useless, dumbiest and confusing things I ever saw people just use because the teacher wants. When no one is demanding you to use this people just go for simplicity and speed
@derroz3157
@derroz3157 Жыл бұрын
Man the music is so FKn annoying: ^Ps above is a type of person who always complains especially when the vid so soo good! ^Above is a type of person who always coitizes himself and causes confusing. ^Above is a type of person why might hv scrizphonia
@matthewlomas9675
@matthewlomas9675 3 жыл бұрын
sheesh thx alex!
@lakshmijay2675
@lakshmijay2675 3 жыл бұрын
Very useful thanks 🎉and which app u r using for write code can u tell me? Pls
@KrigRaseri
@KrigRaseri 2 жыл бұрын
The last tip is a poggers moment.
@עדןמזור
@עדןמזור 4 жыл бұрын
First ;) Also good topic for beginners
@alexlorenlee
@alexlorenlee 4 жыл бұрын
Thanks!
@prajakta_shinde_
@prajakta_shinde_ 4 жыл бұрын
My job depends on my java understandings.. I'm lucky I have your videos now..! Thankyou ^_^
@sidneygerber2295
@sidneygerber2295 4 жыл бұрын
I just failed my midterm. I'm going to use these to try and redo the project to see how it goes!
@Cablur
@Cablur Жыл бұрын
You are like a magician that casts a spell, and all of a sudden the fog is going away, making room for the sun to shine. My mind felt like clearing up while I was watching this awesome video of yours. There are many Java-related tutorial videos out there, but none of them have this talent to explain in such a clear and comprehensible way. Bonus points for your charismatic and charming charisma 😊😊
@icewm1474
@icewm1474 2 жыл бұрын
for the sysout shortcut , I use netbeans on and it allows me to type sout then press tab and it autofills the System.out.println("");
@patricija4179
@patricija4179 2 жыл бұрын
Don't know why this popped up on my feed but why is this video 14 minutes long for getters and setters 😅
@pitero8829
@pitero8829 2 жыл бұрын
Great Video. How to make this works if Class constructor have many parameters? and I want to access setter method for one of those parameters?
@schmetterling4477
@schmetterling4477 Жыл бұрын
Getters and setters are an idiotic concept. Whoever came up with it must have lost his mind. :-)
@rittenbrake1613
@rittenbrake1613 4 жыл бұрын
omg 13:01 the short cut is very useful ! Thank you Alex !!! Right click -->Source-->Generate Getters and Setters
@MisterWealth
@MisterWealth 4 жыл бұрын
When do you use "new" keyword? I saw it wasn't used for name but it was for Account, I guess I'm confused on what and where
@1komentator
@1komentator 4 жыл бұрын
You use it when you are CONSTRUCTING new objects. For example: scanner, random, or some other - custom objects (like account in this alex video)
@MisterWealth
@MisterWealth 4 жыл бұрын
@@1komentator ty
@franzsaijem
@franzsaijem 3 жыл бұрын
what will happen if the attributes or instance variable have an access modifiers, like private, public
@chandraprakashshukla413
@chandraprakashshukla413 4 жыл бұрын
Please make a simple Console based Chess in JAVA
@ozzDeveveloperOpenForWork
@ozzDeveveloperOpenForWork 4 жыл бұрын
can you make videos of solving questions? like many many questions? for java
@Pipopipopi_123
@Pipopipopi_123 4 жыл бұрын
Above all java topics, inheritance is my only favourite...
@abdallahalmanasrah6343
@abdallahalmanasrah6343 Жыл бұрын
I LOVE ALL YOUR VIDEOS! Thanks a lot
@jslowry
@jslowry Жыл бұрын
Thanks
@bertjan1297
@bertjan1297 4 жыл бұрын
6:22 It doesn't confuse the computer (or rather the compiler). It simply sets the local variable 'name' to itself. By doing this it doesn't achieve the goal you want because the name of the scope variable and object variable are the same and the latest defined variable in the scope will always be used. On another note: Getters and setters are a lot of boilerplate code. Even for beginners I would suggest using something the like Lombok extension / plugin for Java. Creating something like the Account class in this video can then be done with: @Data public class Account { private String name; private int age; } That piece of code will have getters and setters and even equalization that is desired. At compile time it will be converted to normal Java code. Or if that is too much you can also use public class Account { @Getter @Setter private String name; @Getter @Setter private int age; }
@avixx
@avixx Жыл бұрын
Love you bro
@ZeeTech21
@ZeeTech21 4 жыл бұрын
can you make tutorial also on how to make a loading after importing data please
Java Method Chaining Tutorial #85
8:43
Alex Lee
Рет қаралды 42 М.
Every parent is like this ❤️💚💚💜💙
00:10
Like Asiya
Рет қаралды 18 МЛН
Spongebob ate Michael Jackson 😱 #meme #spongebob #gmod
00:14
Mr. LoLo
Рет қаралды 10 МЛН
Офицер, я всё объясню
01:00
История одного вокалиста
Рет қаралды 5 МЛН
Java encapsulation 💊
8:27
Bro Code
Рет қаралды 114 М.
Getters & Setters | Java | Tutorial 31
17:49
Giraffe Academy
Рет қаралды 110 М.
Encapsulation in Java Tutorial #83
11:06
Alex Lee
Рет қаралды 257 М.
C++ GETTERS & SETTERS explained easy 🔒
6:12
Bro Code
Рет қаралды 10 М.
Abstract Class In Java Tutorial #79
8:55
Alex Lee
Рет қаралды 542 М.
JavaScript GETTERS & SETTERS are awesome!!! 📐
13:14
Bro Code
Рет қаралды 16 М.
Learn Java in 14 Minutes (seriously)
14:00
Alex Lee
Рет қаралды 4,8 МЛН