How to declare and initialize variable?
Variable is a field in which object store its state. It also an allocations for the placement of data in memory. When the statement of variable declaration is compiled, some bytes of memory will be allocated for the variable. The size is determine by the type of variable.
One variable definition is able to store data only of one particular type. Before it can use, the variable must be declared. The name and type of variable must specified in variable declaration. If you want the variable to have an initial value, you must specify your own value in the declaration.
You can assign a value into variable by using an assignment statement. The assignment operator is =.