Products
GG网络技术分享 2025-11-13 03:16 1
java // 定义两种浮点型变量 float a = .14f; // 注意:float类型时要加上f double b = 0.0; // double类型不需要加随便哪个符号
// 定义字符型变量 char achar = 'A'; char bchar = '\u0061'; // Neng用Unicode编码表示字符

// 定义布尔型变量 boolean abool = true; boolean bbool = false;
// 自动类型转换 byte abyte = 127; // byte类型Neng转换为int类型 int bint = a_byte;
// 有力制类型转换 int aint = 32768; // int类型转换为byte类型兴许会造成数据溢出 byte bbyte = a_int;
// 定义四种整型变量 byte abytetype = 0; short bshorttype = 0; int cinttype = 0; long dlongtype = 0L; // long类型时要加上L
// 输出示例 System.out.println; System.out.println; System.out.println; System.out.println; System.out.println; System.out.println;
Demand feedback