摘要: public class Demo05 { public static void main(String[] args){ // 低 高 // byte, short, char, int, long, float, double int i = 128; // 强制转换 (类型)变量名 高 >低 阅读全文
posted @ 2021-09-04 15:10 *國 阅读(19) 评论(0) 推荐(0)
摘要: `public class Demo03 { public static void main(String[] args) { // 整数拓展: 进制 二进制0b 十进制 八进制0 十六进制0x int i = 10; int i2 = 010; // 八进制0 int i3 = 0x10; // 阅读全文
posted @ 2021-09-04 14:44 *國 阅读(36) 评论(0) 推荐(0)
摘要: // 八大基本数据类型//1.整型int num1 = 10;byte num2 = 20;short num3 = 30;long num4 = 40L; //Long类型要在数字后面加L//2.小数:浮点数float num5 = 50.5F; // float类型要在数值后面加Fdouble 阅读全文
posted @ 2021-09-04 01:24 *國 阅读(27) 评论(0) 推荐(0)