变量提升
A variable is a container that holds values that are used in a Java program. Every variable must be declared to use a data type. For example, a variable could be declared to use one of the eight primitive data types: byte, short, int, long, float, double, char or boolean. And, every variable must be given an initial value before it can be used.
变量是一个容器,其中包含Java程序中使用的值。 必须声明每个变量以使用数据类型 。 例如,可以声明一个变量以使用以下八种原始数据类型之一 :字节,短整数,整数,长整数,浮点数,双精度,字符或布尔值。 并且,在使用每个变量之前,必须为其赋予一个初始值。
Examples:
例子:
int myAge = 21;
The variable "myAge" is declared to be an int data type and initialized to a value of 21.
变量“ myAge”被声明为int数据类型,并初始化为值21。
变量提升