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

preview_player
Показать описание
In this tutorial, we talk about accessor and mutator methods (also known as setter and getter methods), which can be used to access data that has been encapsulated within a class.

TechnicalCafe Blog:

TechnicalCafe Twitter:

Jamie's Twitter:
Рекомендации по теме
Комментарии
Автор

You explained in less than 10 minutes what my teacher couldn't in an entire period. Thank you so much!

soramakizushi
Автор

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!!

jameswhyte
Автор

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!!

aaryadeshpande
Автор

watching this right the night before a unit test on strings and classes. youre a life saver! :)

hamster
Автор

Very clear and excellent background why setters/getters are needed. Well done

samsonwong
Автор

You should teach my programming class! I can't believe I actually understand my assignment now. thank you!!

christineslotkoff
Автор

Thanks, it helped me a lot and got me out of a big confusion.

saidmshah
Автор

Thanks for being the only person who could make this as simple as possible.

davigs
Автор

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.

giahmed
Автор

Your the man with the master plan, this really helped clearly up this concept for me. Thanks you!

MeshTheSnake
Автор

Just want to say thank you so much for all the videos you really helped me a lot!!! :)

TheNivKo
Автор

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.

krillonusa
Автор

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?

nurishqashrinabintimohamad
Автор

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?

xiaoligong
Автор

Thank you so much, I’ve been wasting my time reading my textbook.

jennifers
Автор

how would the balance var get updated?

michaelgonzalez
Автор

why does it return 250.0 instead of 250.00?

christophermyers
Автор

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.

focusaddiction