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';
}
}
本文标题:Java变量初始化
本文链接:https://www.haomeiwen.com/subject/ndsxpqtx.html
网友评论