A variable holds a value that you can use and change throughout your code so long as the variable is within scope. With variable declaration, you not only want to know the syntax of how you declare a variable but you also want to know where. Are you allowed to declare a variable inline? What are the available scopes: local vs. global. Can you assign a value at the same time you declare a variable?
Java Variables
Variable names are case sensitive.
The Java basic types are boolean, byte, short, int, long, float, double, and char. You can also declare a variable to hold a particular instance of a class such as String.
Syntax Example:
C++, Java, and C# all use C-like variable declaration.