Static variables are variables that belong to the class itself, rather than an instance of the class. They are shared by all instances of the class and can be accessed without creating an object of the class.
congrats on reading the definition of Static Variables. now let's actually learn it.
These are variables that belong to individual instances (objects) of a class and have different values for each instance.
Class Variables: Similar to static variables, these are also shared by all instances of a class. However, they can be inherited by subclasses.
Local Variables: These variables are declared within methods or blocks and exist only within their scope. They cannot be accessed outside their respective methods or blocks.