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.
It's hard to find a RU-vidr 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.
Its been said many times in the comments already, but your tutorials truly are the best I've found for beginners such as myself. Too often, tutorials and instructors simply regurgitate the technical jargon that has become second nature to them over the years. Their familiarity with the language makes it as simple as 2+2, and they fail to remember that was not always the case. Greatly appreciate the way you "dumb it down" for us and explain how everything works in terms that novices such as myself can easily ingest.
I have taken a python course in college and purchased Udemy courses to practice Java automation. Even courses that say they are for beginners skim past details as if it's supposed to be common knowledge, yet you paused and seamlessly answered every question that popped up in my head along the way. Thank you for being thorough, your time really paid off.
Thanks for this explanation. I find it frustrating when people don't explain why something is the way it is. You explain everything, thank you. I would be interested in you going more in depth about the JVM. There's a lot on it and I think you would explain it very well. Anyway, thanks for the video!
Great video! i am brand new to java, i had a basic class 4 almost 5 years ago my freshmen year of high school and i could not retain any of the information presented to me. it was really hard for me to learn! After i began watching your videos you make it so much clearer and easier to understand. i can not wait to get to your other playlists! thank you so much!
I have a test in Java tomorrow and i did not understand anything about static variables and methods. So i googled it and thank god your video poped up you you are a real savior man! Thanks a lot mate you're a really good teacher!
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!
You have Java tutorial , wow cool , I was looking exactly for your java tutorial and I wished you have Java tutorial , because I followed all your tutorial in CSS, JavaScript , Asp.net. I am so happy to find you in java , you are so cool guy . thank you man , you are the best tutor I've ever seen since I started my program Computer Science at collage, If I wanted to say one things great about your tutorials is these are stars from very basic and continue to get complicate and totally those are complete and another thing is your voice is soft , smooth, fluent and understandable especially for English second languages.Thank you so much
I love these vids! Best vids I found so far and I have been teaching myself with the book and google for the past month. Man I wish i found your videos sooner!
Wow! This is not like "explain a 5 year old"...its the intelligent way of explaining it...im a student in a university...they only said that static ment it didnt have to be called by an objekt!! True but misleading...doesnt give a logical resason as to why!! This was top notch!! I hope he keeps these videos gping! Thanks alot 😊👍
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.
Hi, so you mentioned that the garbage collector will remove the stuff after it's done... but when does this actually occur? How does it know WHEN to remove the object i.e. newuser1 and its associated variables, etc? Or is this insignificant in grasping the concept of how static works? Also, 2nd question, 4:30, if we did instantiate an object for the Registration class, why couldn't we access the static variable from that object? Isn't it 'always available (as it loiters around in run-time, as you say)? Or is it because of the point you make at the end of the video such that you wouldn't be able to do so? Could you elaborate? Thanks!
Hey great video! I just want to get clear on something...in your constructor where you take a String parameter how come you didnt use this.usernameA= A??? I thought you always do that for your instance variable?
sir may we consider the instance variables as temporary placeholders of a value for its corresponding data type and once its utilisation is accomplished, its value gets flushed out or reset to original as it was created pls correct me if i am wrong 👍👍👍
Congratulation this is a very very good explanation about static variable and method, thank you very much!!!! :) just one more thing, the static variable remains inside the RAM because when static comes out of stack it does not lose its variables ? or static variables and method does not even go into stack ?
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;
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));
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.
Java is the only language I know that has different types of variables like static and instance. I'm a noob so maybe that's the reason I don't know another language that does this. it's a very difficult concept to grasp. static variable to me sounds like an oxymoron. In plain old English, static means it doesn't change and variable means that it changes. This topic is a bit more clear now that I've watched this tutorial. Although it's still hazy on why the hell they would name these things this way?! I wish there was a better name, like persistent variables and persistent methods. "Static variable" is a horrible name. Thank you to EJ Media.
I have a question. You know how you said that static methods should go after static variables. So what about the main method, its static, but in all the previous videos there was no static variables that had been set but the main method was always static. Hope i make sense.
Hafsa saud The main method is a little special - the best way to think of it is that its just the entry point for your program - that is its where everything gets kicked off - a starting point
Correct static methods do not belong to an instance of the class or an object. Static variables and static methods belong to the class. They are not instantiated. Now the static method and variables are put into shared memory. So the other instanced version of the classes or objects can all see that shared memory so that is why they are accessible to anything static. And static always gets loaded first by the JVM ... it will scan for anything with a static keyword. In general though you should use object variables frist but there may be occasions you will use static variables but for the most part you want to use object variables.
I have 3 questions. 1) So is it safe to conclude that by making a static variable, its memory address never change thus it contains the same value and only changes when altered. While objects are created and destroyed after being compiled which leads to my second question that it can't be returned in a static method as it has already been destroyed. And lastly are static methods soley made for static variables only?
MrAirPork1 Exactly static variables will last and instance variables are created and destroyed along with the object. I will say that most developers use instanced variables - there are really only a few reasons why you would use static and that's why I only spent 2 videos talking about static - for the most part you want to use instanced variables