Hi is everything ok? So , could you please be more specific? Declare a variable within the class and use it inside of method? If yes it will always be a instance variable…
@1:29 the variable inside a method and instance variable are different variables having same name. Dont we need to use THIS Keyword to initiate an instance variable?
I think You simply means // normally to call Variable in another class we have to use reference object// but for #staticVariable we can directly call it, not need any reference object. Just #classname.variablename
Your diagram showing how the value of a static variable is shared between multiple instances was very helpful, BUT I have to say I still could not really understand what it all meant until I wrote some code out , playing with the static variable values and watching how they can increment/decrement each time an instance runs and how ALL the instances end up holding a unified value of the static variable. None of your viewers will truly understand this until they see some code! so perhaps explain via code samples next time.