A Java variable is a piece of memory that can contain a data value . A variable thus has a data type . Variables are typically used to store information which your Java program needs to do it's job .
Variables :
1- local
2- instance
3- static
Variables have some attributes that you can see in the picture below :
Notice the example below that use static and instance variables :
Top comments (0)