Static vs Non-Static Variables and Methods In Java - Full Simple Tutorial
HTML-код
- Опубликовано: 11 июн 2024
- Struggling with static vs nonstatic in Java? You found the perfect video!
☕ Complete Java course: codingwithjohn.thinkific.com/...
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
amzn.to/36AfdUu
📕 One of my favorite programming books, Clean Code by Robert Martin
amzn.to/3GTPVhf
🎧 Or get the audio version of Clean Code for FREE here with an Audible free trial
www.audibletrial.com/johnclean...
🖥️Standing desk brand I use for recording (get a code for $30 off through this link!)
bit.ly/3QPNGko
📹Camera I use for recording:
amzn.to/3wlXcmR
🎙️Microphone I use (classy, I know):
amzn.to/3AYGdbz
Donate with PayPal (Thank you so much!)
www.paypal.com/donate/?hosted...
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:
codingwithjohn.thinkific.com/...
codingwithjohn.com
Anyone wants to learn java, this is the destination
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
1:52 cleared a doubt i have been having for over 5 years. Thanks a lot.
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.
My goodness, years using it without knowing how to explain this to other people. Now I can teach it. Thanks!!!
Your contents are easy to follow & understand. Thanks John.✌🏼
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!
Those explanations are crystal clear ... You are an amazing teacher, and those lessons are invaluable 😃
Best description I have seen on this topic. Thanks
U have very POSITIVE vibe. There are v less people like u. Thanks for all tutorials
Pure gold, that made it easy to understand. Thanks John.
John. I just need to say I am so thankful I’ve run across your channel. Thank for educating us all!!!
how did you know that i needed this video? your content is so amazing keep going
I have eyes everywhere 👀
Love you bro. You are the best teacher. Understand your videos are very easy your methods of teaching are the best@@CodingWithJohn
@@CodingWithJohn mr you are great thank you
@@CodingWithJohn I pray for your codiness Saint John.
You have no idea how long I've been struggling to understand this, thank you John.
this is such a live saver for me, who was forced to jump from C to Java, and lost all motivation at the first days via confusion. Now with a better explained Theory and Concepts by you, @Josh, it is strarting to make sense and become understandable, and i also tend to like it more, eventhough i do bad with a little more abstract languages. thanks :)
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!
Simplicity, straight forward, depth.. yep that's CodingWithJohn !
I love you man! KEEP UP THE HARD WORKING
Your examples are spot on. Its easy to understand the difficult concept when you explain it.
Very nice explanation. Keep up with a good work John!
He really has a simple and very understandable way of explaining these concepts. Thank you very much for sharing them. Greetings from Peru
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!
This is the clearest explanation of static I have come across. Thank you!
Hi John! Could you do some videos about design patterns like Singleton, and others?
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!
Another amazingly explained concept man!!!
Thank you so much John!I was questioning myself a lot regarding this matter 💥
Super clear, thanks!
It was very nicely explained. Thanks John.
Best explanation I've ever heard! Thanks a lot!!!!
This is gold. Thanks John
it was a very clear explanation ,thank for your efforts for making this get sence.
THE Best explanation of this on the internet.
great video John, your yt channel and videos are amazing!
Great to see you back with a new video! Thanks
John, this is an excellent explanation! I'm grateful.
Hi John. thank you so much! your videos are truly the best!
Great video! Very easy to understand. Thank you very much.
That was very informative, thanks a lot
Before your video, I felt the same, now finally ‘static’ is clear for me, thanks!
it is no longer confusing after this video. appreciated!
❤ Thank you for this...the concept is so much simpler.
Perfect video, thank you!
It is sooo clear, thanks to you
You're a great teacher, thank you so much!
Awesome John, please keep on doing more such great contents.
I utilized your content as a reference for my university assignment, citing it in APA format. Your material was incredibly helpful, simplifying complex concepts for easy comprehension. Hopefully, the university won't find any issues with my referencing!
Thanks very much Jhon.
Very nice explanation. Thank you very much 😸👌
I like how u make it so simple. thank u so much
Very useful video as usual - cheers !
Sir
I am going to lie
you are absolutely amazing.
I taught programming 3 years ago and I have been working professionally for almost two years.
always your videos are amazing.
Thanks so much.
Evening John, I've been following you since I started a Java course this summer. I've finished a project using static, I use the concept, but I do no know why. I am going to enjoy this video.
Thanks, understood it!
Can you pls make a video about modules in Java? ur the best❤
you teach so difficult concepts so easily
Thank you so much! This helped so much
Hey John,
Can you make a video about Java modules? Really important, thank you. You are the best!
Very helpful, many thanks!
Extremely helpful.
Thanks for the video really helped me
Great explanation, thanks a lot!
Brilliant as always, thank yu very much
Thank you so much John!
Thank you for your teaching!
very helpful video. tysm
Nice explanation.
Relearning Java right now after close to 8 years never touching it. I remember never understanding what static meant and how it was used. Gave me so much grief trying to figure it out. Been debugging a few if statements today for close to 5 hours, come to find out it had to do with needing a static declaration.
Long story short, found this video and everything finally made sense! Thank you!
Hey Sir! I am from India and I am learning java by watching your videos ❤❤ Thank you Sir 😊😊
Hi. I really love all your videos, PLS keep doing it,. Thanks for everything,
WHY ARE YOUR VIDEOS SO GOOD AND EASY TO UNDERSTAND DO YOU KNOW HOW MANY PEOPLE YOU HAVE SAVED THANK YOU SO MUCH 🙏🙏🙏🙏🙏🙏🙏
great explanation
Thanks a lot for your video! Tbh i was stuck with the same problem of not able to access the rest controller class in Spring since non-static class and method cannot be access without instantiated, so after i watched your video i went to look back at some information and found out that you can just autowired the class object from the beginning :v
You really helped me pointing out the vagueness of my understanding about all this static non-static thing, thank you!
Your English is perfect.The best one for me to develop speaking skills.
hey John !!! amazing work requesting you to create a spring framework course as well .
This is a very good video. I used to abuse the "static" keyword, and it caused so many bugs that I am only now beginning to understand 3 years into my coding. Lol
I've learned by the terms "static"/"instance" when talking about methods and variables. I think it is less confusing than static or non-static, specially for beginners.
Very helpful!
Someone told me that Static is the same as the "Shared" keyword in VB. Calling it "Shared" instantly made sense to me as opposed to "Static".
Goes without saying, great video and breakdown of the topic.
Amazing explanation
much needed thanks very cool
I'm in 10th grade rn and this video of yours has helped me alot
Thank you John
Here's me shouting at you in the comments: GREAT VIDEO. I LOVE THAT YOUR VIDEOS ARE SHORT, SIMPLE AND STRAIGHT TO THE POINT. 😄
Great tutorial
It was a very good video for anyone to understand Static vs Non-Static Variables and Methods In Java.
Glad to see you again sir
You have my like, not because you explain this concept so well, cause you do. But because of the way you "miau".
your channel is very helpful i learned so much from it keep uploading
I don't get to as often as I'd like but I'll keep it going!
Hey jhon, i have seen most of your videos on java and they are good. I have a request Please make videos on spring and spring boot as well
Very useful!
You are a good teacher
you're the best! thanks
Literally better than all my comp sci profs
awesome,Thank you.
Thank you!!
nice, goated explanation
Wow, thanks John
Thank you!
Best Java channel ever.
goat of explanation, tks!!!!!
Thank you so much