Java Tutorial for Beginners – 19 – Static Variables and Static Methods

///Java Tutorial for Beginners – 19 – Static Variables and Static Methods

Java Tutorial for Beginners – 19 – Static Variables and Static Methods

FavoriteLoadingAdd to favorites

Well up to now we have been using object variables, it’s time to give static variables a little love. This was the hardest video I have done yet because static variables are really hard to explain, but I think you will find this video very useful (it may not seem like it but this video required a lot of planning).

source

Java468x60
By |2019-09-13T22:30:15+00:00September 13th, 2019|Java Video Tutorials|39 Comments

39 Comments

  1. Filip Bošnjak September 13, 2019 at 10:30 pm - Reply

    Great video and explanation. Thanks sir!

  2. Ziko Isaac September 13, 2019 at 10:30 pm - Reply

    Best explanation ever thanks!!

  3. JIAQIN TAN September 13, 2019 at 10:30 pm - Reply

    Thank you.

  4. M M Khan September 13, 2019 at 10:30 pm - Reply

    your methode return type is int and you want to return a String value of usernameA what kind of programming is that?

  5. Diogo Sequeira September 13, 2019 at 10:30 pm - Reply

    This is a clear && excelent explanation, really nice work putting these concepts together!

  6. Debabrata Roy September 13, 2019 at 10:30 pm - Reply

    It is very difficult to learn something like this on your own, as opposed to in an academic environment. You don't have the opportunity to discuss or ask questions to peers. You filled the void for me, Thank you! You have done a wonderful job, please keep doing it.

  7. ELENA GARCIA DIAZ September 13, 2019 at 10:30 pm - Reply

    A very useful and well explained tutorial

  8. Annalise Trite September 13, 2019 at 10:30 pm - Reply

    Really good explanation

  9. David Fomin September 13, 2019 at 10:30 pm - Reply

    Thanks man, great explanation

  10. Domestos Bleach 5l September 13, 2019 at 10:30 pm - Reply

    I know this video is old but damn sooo fucking usefull. Thanks for making a awesome video,subed

  11. Vugh de Ziestem September 13, 2019 at 10:30 pm - Reply

    Subs first, watching later…!!

  12. Chuanmudi Qin September 13, 2019 at 10:30 pm - Reply

    You are awesome! No book ever explain it like you did which is a shame.

  13. GNIW September 13, 2019 at 10:30 pm - Reply

    Best explanation about the memory and static! Thanks!! I was puzzled in the last few days, your 15 min saves my few days of brain cells.

  14. Akshay September 13, 2019 at 10:30 pm - Reply

    Subbed! Amazing

  15. Josue F Castillo September 13, 2019 at 10:30 pm - Reply

    having learned MS BASIC in 1995; my head is still wrapped with my old crutches… taking this slow and I don't care how many times I have to got through this.

  16. Ivan Pantic September 13, 2019 at 10:30 pm - Reply

    I am not sure if it is because something has changed but it gives me an error when I do this:
    public static void main(String[] args) {

    Registration.username;

  17. Prakash Purohit September 13, 2019 at 10:30 pm - Reply

    Sir,
    What is the mean of Return Value ?

  18. miles ♕ September 13, 2019 at 10:30 pm - Reply

    "it's like a cliff on the edge of the sea–it never goes away" hahahaha

  19. photizo adom September 13, 2019 at 10:30 pm - Reply

    Thank you

  20. 재강 September 13, 2019 at 10:30 pm - Reply

    Wow literally the best video to explain static. I watched like dozens of videos to understand this concept but they all just explained about technical stuff not why. Thank you so much!

  21. Erick Aviles September 13, 2019 at 10:30 pm - Reply

    This explanation is exactly what I've been looking for. Thank you for these tutorials!

  22. yaboyshelz September 13, 2019 at 10:30 pm - Reply

    I appreciate that you admitted that it was a bit of a struggle to understand this…. Its not as easy as people make it seem at first

  23. 7906jun September 13, 2019 at 10:30 pm - Reply

    had to watch this 6 times and still there are some gray areas but I feel somewhat comfortable moving on finally.
    But one question I have is that, why not make all the variables and methodes static? So I don't have to worry about static goes with static and instance goes with instance?

    Thanks.

  24. napowik September 13, 2019 at 10:30 pm - Reply

    7:10 outch, This is only a reference variable in the Stack memory and not an Object, object gets loaded to the heap with "new" syntax :O

  25. napowik September 13, 2019 at 10:30 pm - Reply

    OMFG I've been enlightened :O

  26. Satoshi Nakamoto September 13, 2019 at 10:30 pm - Reply

    what if i want to find the list of names in my database ? how do i do that ?

  27. Hugo Ramirez September 13, 2019 at 10:30 pm - Reply

    Nice explained. Now this information has been loaded in my brain.

  28. oldiehugger September 13, 2019 at 10:30 pm - Reply

    Great video, just wonder if you can paste the codes as well so that we can practise right away.

  29. clutchmadness September 13, 2019 at 10:30 pm - Reply

    When I realised how good this tutorial was, I actually came back to this video just so that I could give it a like 🙂

  30. ihsan azhar September 13, 2019 at 10:30 pm - Reply

    you are the best man. i love your explanation. subscibed

  31. Rockman Exe September 13, 2019 at 10:30 pm - Reply

    thank you. you make this this topic easy to understand

  32. Ainsley Harriott September 13, 2019 at 10:30 pm - Reply

    so a static method means that it is always there?

  33. Kjell-Philipp H. September 13, 2019 at 10:30 pm - Reply

    And they all happily lived ever after…

  34. Sulayman Sawaneh September 13, 2019 at 10:30 pm - Reply

    i really like your explaination, i have watch several videos but they aren''t a match to your's.keep it up and thanks a lot

  35. Mario Victoria September 13, 2019 at 10:30 pm - Reply

    very simple and great tutorial 🙂

  36. Unlim ited September 13, 2019 at 10:30 pm - Reply

    guys only one question if this : public int total2(int n) {
    return n = Speed + ModelDate;
    }
    is the same with this :
    public int total2() {
    return Speed + ModelDate;
    }

    Why should i use the first one and not just straight the second one?

    Second Question at program method if i use the first option
    it requires and int value which is doing nothing and it only prints the total sum anyway
    System.out.print(BmwM30.total2(10)); <- if it doesnt matter what value i put 10, 12 , why it requires an int value in the first place?

  37. Nadario Seays September 13, 2019 at 10:30 pm - Reply

    It's hard to find a YouTuber that will break everything down "Barney Style", It gives the user so much insight because helps them follow along with things they can refer to. Most beginner tutorials are quick to throw out program Jargin. Great job A += A.

  38. Raechelle Brutus September 13, 2019 at 10:30 pm - Reply

    Anyone watching these Tutorials live near Boise? If so we should link up I could use help understanding how some of this works if you got it down.

  39. menobody11 September 13, 2019 at 10:30 pm - Reply

    love the humor! keep it up!

Leave A Comment

*