Getters and Setters – Learn Getters and Setters in Java



Full Java Course: https://course.alexlorenlee.com/courses/learn-java-fast

I recommend installing Tabnine autocomplete on your IDE (free):
https://www.tabnine.com/get?lang=java&utm_source=youtube.com&utm_medium=Ins&utm_campaign=AlexLee

If you’re new to programming, I recommend you use Edabit: https://edabit.com/?ref=alexlee

Disclosure: Tabnine & Edabit links provided are linked to my affiliate accounts & support the channel.

Getters and setters let you set/get private variables in a class with methods.

Getters and setters in java can be tricky at first… But SURELY you’ll get it 🙂 If you followed along, congrats! You learned by-doing!

I hope you enjoyed this tutorial on getters and setters in java! I like to have a nice mix of java tutorials and actual projects for you all 🙂

Was this able to help you learn getters and setters in java? –

Free tips and programs: http://alexlorenlee.com
Programmer Humor: https://www.xonot.com – Promo code: “ALEX10” for 10% off

Recommended Channels to Subscribe to
Career Karma: https://youtube.com/channel/UCkCwv67-HTCzIhxLG8aHOQQ
TheNewBoston: https://youtube.com/user/thenewboston

~
https://discord.com/invite/Yk3uqST
https://instagram.com/alexlorenlee
https://youtube.com/channel/UCLkeDGcXfiKlN2imazwkg4A (2nd channel)

Alex Lee

36 thoughts on “Getters and Setters – Learn Getters and Setters in Java

  1. **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.

  2. I remember when you was so less subscribers, I made you a few compliments back then and I wanted to join the Facebook page but I took to much time so you can accept me so , I deleted my request anyways man the reason I put another comment is that you really help people around with this videos , Alex be safe man and thanks for this videos very helpful now that I have a clue about java, now is coming together the code.

  3. I just want to say: Thank you i just got what setters and getters are.. Amazing and very easy. Keep going from Greek with love. Im trying now Json to java object and im a little confused. Do you have any source url for the json deserialize?

  4. I have a problem.

    I have my Public class Main()
    And my public class Cars()

    Cars have Getters and setthers:
    gettheName()

    When i try call that getter from cars to Main:

    Cars.gettheName();

    This happens:
    The method gettheName() is undefined for the class Main.

    How can i fix this??

Leave a Reply

Your email address will not be published. Required fields are marked *