摘要:Base Demo08 public class Demo08 { static final double PI = 3.14; //final static double PI = 3.14; 输出结果相同 //final为修饰符,不存在先后顺序 //通过 final 来确定常量 (静态) 可以直
阅读全文
摘要:Base Demo07 public class Demo07 { public static void main(String[] args) { int a = 10; int b = 20; a+=b; // a = a+b a-=b; // a = a-b System.out.printl
阅读全文
摘要:Base Demo06 public class Demo06 { public static void main(String[] args) { /* A = 0011 1100 B = 0000 1101 相同进制比较 A&B = 0000 1100 // 数字 00->0 01->0 10-
阅读全文
摘要:Base Demo05 public class Demo05 { public static void main(String[] args) { //操作数比较大的时候,注意溢出问题 //JDK7特性 数字直接可以用下划线分割 int money = 10_0000_0000; int year
阅读全文
摘要:Base Demo04 public class Demo04 { public static void main(String[] args) { /* 字节容量 低 高 byte,short,char,int,long,float,double */ int i = 128; double b
阅读全文
摘要:Base Demo03 public class Demo03 { public static void main(String[] args) { //整数拓展: 进制 二进制0b 十进制 八进制0 十六进制0x int i = 10; int i2 = 010; //0 int i3 = 0x1
阅读全文
摘要:Base Demo02 public class Demo02 { public static void main(String[] args) {// String a = "hello";// int b = 10;// System.out.println(a);// System.out.p
阅读全文