摘要: public class Demo07 { //修饰符,不存在先后顺序 常量 final 常量名 =值 static final double PI = 3.14; public static void main(String[] args) { System.out.println(PI); }} 阅读全文
posted @ 2021-09-13 11:43 雪人爱学习 阅读(38) 评论(0) 推荐(0)
摘要: public class Demo04 { public static void main(String[] args) { int i = 128; byte b = (byte) i; //内存溢出 //强制转换 (类型)变量名 //自动转换 低到高 System.out.println(i); 阅读全文
posted @ 2021-09-08 20:21 雪人爱学习 阅读(40) 评论(0) 推荐(0)