Static vs Non-Static Variables and Methods In Java - Full Simple Tutorial

preview_player
Показать описание
Struggling with static vs nonstatic in Java? You found the perfect video!

For beginner Java programmers, the concept of static vs nonstatic fields and methods can be incredibly confusing. I know it was for me!

But it doesn't have to be difficult. We'll go over EXACTLY what the difference is, how they're used, and when you should make your methods and fields static or nonstatic in your programs.

Learn or improve your Java by watching it being coded live!

Hi, I'm John! I'm a Lead Java Software Engineer and I've been in the programming industry for more than a decade. I love sharing what I've learned over the years in a way that's understandable for all levels of Java learners.

Let me know what else you'd like to see!

Links to any stuff in this description are affiliate links, so if you buy a product through those links I may earn a small commission.

📕 THE best book to learn Java, Effective Java by Joshua Bloch

📕 One of my favorite programming books, Clean Code by Robert Martin

🎧 Or get the audio version of Clean Code for FREE here with an Audible free trial

🖥️Standing desk brand I use for recording (get a code for $30 off through this link!)

📹Camera I use for recording:

🎙️Microphone I use (classy, I know):

Donate with PayPal (Thank you so much!)

00:00 What Non-Static means
03:34 What Static means
05:53 Why can't I access my Non-Static variable?
08:42 Using Static for Constants
10:30 When to make something Static or Non-Static?

☕Complete Java course:

Рекомендации по теме
Комментарии
Автор

Anyone wants to learn java, this is the destination

amdbest
Автор

Hey John, I truly appreciate the way you explain concepts. There's one aspect I'd hope you cover: Serialization and Deserialization. Thank you for keeping up the good work. You make so many people want to code

gunnerxt
Автор

1:52 cleared a doubt i have been having for over 5 years. Thanks a lot.

neonwl
Автор

Just in the nick of time. My students are presently struggling with static and non static and this video might help them look at both concepts from yet another angle.
Thanks again for your short but incredibly succinct videos.

micleh
Автор

This 11 mins video probably saves you HOURS of research on the internet what the keyword Static means, you're the best John! 👏

lootster
Автор

Your contents are easy to follow & understand. Thanks John.✌🏼

kingslymatthew
Автор

My goodness, years using it without knowing how to explain this to other people. Now I can teach it. Thanks!!!

matiloki
Автор

Java was the one language I was intimidated and frustrated with, until I found your channel. Then it became my favorite language to work with!

SupahBro
Автор

Finding your channel is luck for me! I had avoided to learn Java because of difference from any other language and stream of fearful keywords. But thanks to your teaching that anyone can understand and well-made examples in your videos and courses, I could understand what mean of keywords and how to code in Java. Not only that, I find attraction of Java and enjoy coding with it! I sincerely hope to see your videos more. Thanks!

yte
Автор

Those explanations are crystal clear ... You are an amazing teacher, and those lessons are invaluable 😃

olivierbegassat
Автор

These lectures are the best ones that I've seen on the Internet, even compared with L/U big monsters. Not only knowledge, but hidden rocks that you can collide with, everything explained. Thanks to the author!

sgretsch
Автор

Hi John! Could you do some videos about design patterns like Singleton, and others?

Kuba
Автор

Best description I have seen on this topic. Thanks

timmann
Автор

John. I just need to say I am so thankful I’ve run across your channel. Thank for educating us all!!!

jessicar
Автор

John, you're the man!!! I have finished a bootcamp and learned core Java in 3 months from zero. Now, after a year, going through all the topics with your videos is perfecting my knowledge and making me feel more comfortable with things that I've learned. Your efforts in sharing your knowledge are very much appreciated!

rmoquhj
Автор

Simplicity, straight forward, depth.. yep that's CodingWithJohn !
I love you man! KEEP UP THE HARD WORKING

Hassan-lvdi
Автор

how did you know that i needed this video? your content is so amazing keep going

GabrielLima-yqqp
Автор

Pure gold, that made it easy to understand. Thanks John.

AdrianTregoning
Автор

He really has a simple and very understandable way of explaining these concepts. Thank you very much for sharing them. Greetings from Peru

magadiflo-dev
Автор

Very nice explanation. Keep up with a good work John!

raderadovanovic