Java Tutorial 19 - Accessor and Mutator Methods (Setters and Getters)

  Рет қаралды 55,722

TechnicalCafe

TechnicalCafe

Күн бұрын

Пікірлер: 58
@soramakizushi
@soramakizushi 6 жыл бұрын
You explained in less than 10 minutes what my teacher couldn't in an entire period. Thank you so much!
@TechnicalCafe
@TechnicalCafe 6 жыл бұрын
I'm glad to hear that you found this video helpful! Thank you for watching and for taking the time to comment - it's greatly appreciated! Best wishes with your studies!
@ethangaines2658
@ethangaines2658 3 жыл бұрын
Teachers are chosen for their wealth of knowledge on subjects, not their teaching ability. They are not one and the same.
@aaryadeshpande1621
@aaryadeshpande1621 4 жыл бұрын
You literally explained the concepts to the point where I could teach someone else. Literally, I never understood anything about this before. This video has really taught me that when it comes to programming, actually coding yourself, questioning, then teaching is the best explanatory process (teacher). I often don't get a word my teacher or my textbook says when explaining such concepts in Java because they have no meaning until you have the picture (engaging yourself). Videos like these are lifesavers! (This was like Khan Academy, but Computer Science) Thank you!! Keep up the videos!!
@TechnicalCafe
@TechnicalCafe 4 жыл бұрын
I'm glad that you found this video helpful! I appreciate the kind comments, as well! Thanks for watching! Please don't hesitate to reach out with any questions, comments, or suggestions should any pop up!
@jameswhyte1340
@jameswhyte1340 8 жыл бұрын
Incredibly well demonstrated! I like how you get straight to the point right off the bat. This is like visual gold. Bar none the best lesson I've seen on the topic. Bravo!!
@TechnicalCafe
@TechnicalCafe 8 жыл бұрын
+James Whyte Thank you for watching and for the kind compliments! I'm glad you liked the video and hope you found it useful! Please don't hesitate to ask if you ever have any questions and also please feel free to let me know if you have any suggestions or comments!
@davigs7218
@davigs7218 4 жыл бұрын
Thanks for being the only person who could make this as simple as possible.
@TechnicalCafe
@TechnicalCafe 4 жыл бұрын
I'm glad you found this helpful! Thanks for the kind comments and thanks for watching - I appreciate it!
@hamster1959
@hamster1959 3 жыл бұрын
watching this right the night before a unit test on strings and classes. youre a life saver! :)
@giahmed82
@giahmed82 5 жыл бұрын
To be honest, I am new to Java. your tutorials are so helpful and easy to follow. I am currently follow series of your tutorials and they are amazing.
@TechnicalCafe
@TechnicalCafe 5 жыл бұрын
Thank you for watching and for taking the time to share your feedback! I’m glad you find these tutorials helpful! Please let me know if there are any specific topics you’d like to see covered in future videos or if you have any questions! I’d be happy to try and help out where I can!
@giahmed82
@giahmed82 5 жыл бұрын
@@TechnicalCafe Many thanks for your reply. I need some help with converting int array to double array. I have watched your tutorial 6 for Arrays but have not come across something which converts int array to double or int array to ArrayList. Can you please cover this topic?
@christineslotkoff8941
@christineslotkoff8941 7 жыл бұрын
You should teach my programming class! I can't believe I actually understand my assignment now. thank you!!
@TechnicalCafe
@TechnicalCafe 7 жыл бұрын
Hi, Christine! Thank you for watching and for taking the time to leave such a kind compliment! I'm glad that you found this tutorial useful and wish you the best in your programming class! What class are you taking?
@samsonwong8242
@samsonwong8242 3 жыл бұрын
Very clear and excellent background why setters/getters are needed. Well done
@MeshTheSnake
@MeshTheSnake 7 жыл бұрын
Your the man with the master plan, this really helped clearly up this concept for me. Thanks you!
@TechnicalCafe
@TechnicalCafe 7 жыл бұрын
+NatMesh Thanks for watching and for taking the time to comment. Glad you found this helpful! Please let me know if there's anything else you'd like to see a video about.
@MeshTheSnake
@MeshTheSnake 7 жыл бұрын
no problem! Could you actually make a video on multidimensional arrays and partially fully arrays(adding new elements to an array and deleting elements)? Thanks!
@TechnicalCafe
@TechnicalCafe 7 жыл бұрын
Thank you for the suggestions! I just posted a video about ArrayLists in Java, if you're interested in checking that out. It's not exactly what you were asking for, but somewhat related.
@TheNivKo
@TheNivKo 8 жыл бұрын
Just want to say thank you so much for all the videos you really helped me a lot!!! :)
@TechnicalCafe
@TechnicalCafe 8 жыл бұрын
Thank you for watching and for taking the time to leave a comment! I appreciate your viewership! Please don't hesitate to ask if you have any questions! Is there anything else you'd like to see on the channel, specifically?
@saidmshah8574
@saidmshah8574 6 жыл бұрын
Thanks, it helped me a lot and got me out of a big confusion.
@krillonusa
@krillonusa 8 жыл бұрын
ayy thanks for breaking it down. I understood the get, but didn't really understood the mutator. I didn't know what the output was supposed to be. Now I get the concept of my assignment.
@TechnicalCafe
@TechnicalCafe 8 жыл бұрын
Glad to hear that you found this helpful! Best wishes on your assignment! Are you a computer science major? Please don't hesitate to let me know if you have any questions, comments, or suggestions!
@krillonusa
@krillonusa 8 жыл бұрын
Yeah I am a CS major. I have to create a program that displays a Cube's dimensions using sets/gets
@TechnicalCafe
@TechnicalCafe 7 жыл бұрын
Nice! Hope the project went well! Best wishes with school!
@jennifers6823
@jennifers6823 Жыл бұрын
Thank you so much, I’ve been wasting my time reading my textbook.
@xiaoligong6670
@xiaoligong6670 6 жыл бұрын
You made it so clear!! Just one question, I saw some of mutators start with public void set instead of void set, why is that?
@TechnicalCafe
@TechnicalCafe 6 жыл бұрын
If you're referring to the video, I'm not certain as to why I would have done that. However, not including an access modifier like "public" for a method would cause the method to have the "default" access modifier, which is similar to the "public" modifier, but with a few restrictions. Here's a link that explains the difference between the "public" and the "default" access modifiers in more detail: www.geeksforgeeks.org/access-modifiers-java/. Thanks for watching and for taking the time to leave a comment! I appreciate it!
@tiac1309
@tiac1309 5 жыл бұрын
super informative video thank you!
@TechnicalCafe
@TechnicalCafe 5 жыл бұрын
Thanks for the compliment! I’m glad you found the video helpful! Please don’t hesitate to reach out with any questions, comments, or suggestions!
@johnharris2947
@johnharris2947 5 жыл бұрын
Thanks this cleared everything up
@TechnicalCafe
@TechnicalCafe 5 жыл бұрын
I'm glad you found this video helpful! Thanks for watching and for taking the time to leave a comment!
@johnharris2947
@johnharris2947 5 жыл бұрын
@@TechnicalCafe No problem, do you have anything on inheritance and polymorphism?
@zacharychapman3732
@zacharychapman3732 7 жыл бұрын
Helpful video! Thanks!
@mordred9027
@mordred9027 2 жыл бұрын
Thank You!
@nurishqashrinabintimohamad655
@nurishqashrinabintimohamad655 3 жыл бұрын
sorry everyone, it might silly question.. but why we have to do all this with 2 files? i mean we usually compile all of those in 1 file right?
@michaelgonzalez2521
@michaelgonzalez2521 7 жыл бұрын
how would the balance var get updated?
@TechnicalCafe
@TechnicalCafe 7 жыл бұрын
+Michael Gonzalez The "balance" variable would be updated using a mutator (getter) method. In this video, I used the example of a setBalance() method, but you could create as many mutator methods as you'd like to change the value of the private "balance" instance variable. Some other example mutator methods that you might want in the "BankAccount" class might include "Deposit()" or "Withdraw()" methods. I hope this helps to answer your question! Please don't hesitate to reach out if you have any other questions, comments, or suggestions! I'd be happy to try and help where I can! Thanks for watching!
@focusaddiction3460
@focusaddiction3460 7 жыл бұрын
I still don't get the point of doing this instead of changing the variable directly without the acessors. Both will change the variables, won't they? What's the point? I know there is one, but i can't understand it.
@shreyapandey2372
@shreyapandey2372 6 жыл бұрын
Focus Addiction i am also confused you are still able to see and access the data using get and set method so what's the point I don't see it as data being secured here
@shreyapandey2372
@shreyapandey2372 6 жыл бұрын
muhammad yasin but aren't get and set public methods? That should allow everyone to set variables , how are they protected ?
@VoNoWaR
@VoNoWaR 8 жыл бұрын
you sound like scarce
@TechnicalCafe
@TechnicalCafe 8 жыл бұрын
I'm not sure I know who or what "scarce" is? Thanks for watching, though! :)
@jovanyhernandez2313
@jovanyhernandez2313 4 жыл бұрын
Please become a professor at ksu🙏
@TechnicalCafe
@TechnicalCafe 4 жыл бұрын
I appreciate that compliment, ha! Best wishes with your studies and thank you for watching! Please don't hesitate to reach out if you ever have any questions, comments, or suggestions!
@jovanyhernandez2313
@jovanyhernandez2313 4 жыл бұрын
TechnicalCafe do you have a video on subclasses?
@christophermyers9427
@christophermyers9427 8 жыл бұрын
why does it return 250.0 instead of 250.00?
@yourfutureself4327
@yourfutureself4327 4 жыл бұрын
I found this: www.thetopsites.net/article/53605817.shtml#:~:text=Java%2C%20like%20most%20languages%2C%20will,it%20using%20the%20code%20above.
@ochukotubie6849
@ochukotubie6849 6 жыл бұрын
Hey guys its scarce here
@TechnicalCafe
@TechnicalCafe 6 жыл бұрын
Ha, someone else actually said that I sound like Scare before, too! Thanks for watching!
@UsmanAli-ys1eg
@UsmanAli-ys1eg 7 жыл бұрын
nice
@TechnicalCafe
@TechnicalCafe 7 жыл бұрын
+Usman Ali Thanks for watching!
@vallurishiva7303
@vallurishiva7303 3 жыл бұрын
My 50 comment in Ur video
@TechnicalCafe
@TechnicalCafe 3 жыл бұрын
Thanks for watching and for taking the time to comment! It’s appreciated!
@MariMuthu-s9f
@MariMuthu-s9f Ай бұрын
In the Athlete class given below, make all the attributes private and add the necessary accessor and mutator methods Represent Maria, the runner and make her run.
Java Tutorial 20 - Nested Loops
5:15
TechnicalCafe
Рет қаралды 955
Human vs Jet Engine
00:19
MrBeast
Рет қаралды 208 МЛН
Family Love #funny #sigma
00:16
CRAZY GREAPA
Рет қаралды 54 МЛН
За кого болели?😂
00:18
МЯТНАЯ ФАНТА
Рет қаралды 2,2 МЛН
Getters and Setters Java Tutorial #84
14:12
Alex Lee
Рет қаралды 506 М.
Return Statement in Java #27
14:38
Alex Lee
Рет қаралды 281 М.
Java super keyword 🦸‍♂️
8:09
Bro Code
Рет қаралды 100 М.
Java Tutorial #8: Getters and Setters Explained
8:24
CodingWithChandler
Рет қаралды 106 М.
Java overloaded constructors 🍕
8:02
Bro Code
Рет қаралды 75 М.
Java abstraction 👻
5:30
Bro Code
Рет қаралды 144 М.
Classes Part 13: Accessor and Mutator Methods (Java)
11:09
Nathan S
Рет қаралды 23 М.
Data Hiding in Java | Java for beginners
15:08
SG Tutorial
Рет қаралды 1,8 М.
Human vs Jet Engine
00:19
MrBeast
Рет қаралды 208 МЛН