Java Programming: 9 - Classes and Objects

preview_player
Показать описание
In this tutorial we learn how to instantiate objects from classes that we create. We learn about instance variables, instance methods, and constructors. Getters and setters are introduced and encouraged as good coding practice.

The static modifier is also explained.

You would usually make instance variables private when public getters/setters are provided as part of the interface, but access modifiers have not yet been covered in this series.

You can also move the main method to the Person class and keep the program for this tutorial in one file, however, I thought it would better get the concept across by having the Person class be isolated from main.
Рекомендации по теме
Комментарии
Автор

I just don't know how to thank you. I have such a horrible teacher, who seems to know what he's doing but he absolutely sucks at teaching. All he says is "you do it like this". Go figure. You're an absolute pro. Not only do you know what you're talking about, most importantly and very rarely, you know how to deliver and explain the material in such a clear and relaxed way in such a small amount of time. God bless you. What goes around comes around. I haven't met you but I do wish you all the best!!!

ahmedelkady
Автор

No other tuts. on the topic is remotely comparable to this...you are a genius and a great teacher....

RobertL
Автор

After re-reading several introductory tutorials on classes and objects without  achieving a solid grasp on the concept, I lucked out and found this video. It was extremely helpful and the getters and setters segment was icing on the cake! While it's hard to say whether relying on Eclipse to auto-generate those methods is ideal in a learning environment, I definitely appreciated those tips as well. Thanks!

ITD
Автор

I've been studding Java for the last year in college; and your tutorials are just perfect. You should take great pride in how you are helping people all over the world. Keep up the good work; from a 2nd year Computer Enginnering student in NUIG Ireland. Thank you!

dnhynes
Автор

There are some very decent Java teachers on Youtube but, you are without doubt the best I've come across.. Much appreciated.

UrbanWearables
Автор

The best explanation of constructors, getters and setters on YouTube - thanks!

petercourt
Автор

May god bless you, after not programming for one year I've didn't remember this topic, you saved me

mohsenalbo
Автор

You are very talented at getting information across. You speak clearly, slowly and you are precise.

Thanks a lot.

Subbed.

eiloolie
Автор

Your a pro!! Hats off to your teaching style. Millions of videos on YouTube, but your unique.

flagila
Автор

You just saved my ass from spending another semester in Community College. Cheers to all the com sci majors out there!

orangeflip
Автор

I really appreciate you taking the time to make these tutorials. I have watched Lesson 8&9 and already feel like I am getting a grasp of programming with objects! Thanks again!
-Joe

jagged
Автор

Best tutorial of all times...now I understand how to create a class

humphreyatanglekhoba
Автор

These class, object, and many other new concepts of Java (to me) giving quite a bit of trouble getting grasp of them.  Your video has been the most enlightening so far.  I'll continue watching your series.  Thanks a lot.  

turboromy
Автор

Glad I found you mate. Some people are just born to teach.

RAFAEI_
Автор

Oh my god thank you so much. I know everyone says this, but my teacher is absolutely awful at explaining things to the class and this book is no help either as its methods and examples are long and confusing. I owe you my grade, dude. You're the best.

Curthe
Автор

Best Java tutorials on Youtube. Thank you!

hightechredneck_
Автор

I had to pause and rewind this video so many time because it was so informative. Thank you so much.

ltzjohn
Автор

Amazing explanation. During my studying i never got this kind of great explanation who objects and static variables respectively methods work. Thank a lot!!!

quadno
Автор

Small amount of time but you take me to the next level.I am very enthusiastic to see next video(i watched nearly15 times). Thank you.

TheSiva
Автор

you are literally the best at explaining this stuff, keep doing it

SashaFarenyuk