Java的变量初始化
变量类型 + 变量名 + 值
public class DataType {
public static void main(String[] args) {
int a = 1;
byte z = 22;
String s = "java";
boolean b = true;
double pi = 3.14159;
char c = 'x';
}
}
变量类型 + 变量名 + 值
public class DataType {
public static void main(String[] args) {
int a = 1;
byte z = 22;
String s = "java";
boolean b = true;
double pi = 3.14159;
char c = 'x';
}
}