10 2021 档案
摘要:静态导入包 import static java.lang.Math.random; // 只导入类的某个方法
阅读全文
摘要:阶乘 一定要有边界条件 test(5); public static int test(int i){ if(i == 1){ return 1; }else{ return i * test(i-1); } }
阅读全文
摘要:Scanner int i = 0; float f = 0.0F; Scanner scanner = new Scanner(System.in); System.out.println("请输入整数:"); if(scanner.hasNextInt()){ i = scanner.nextI
阅读全文
摘要:位运算 A = 0011 1100; B = 0000 1111; A & B = 0000 1100 两个都为1才是1 A | B = 0011 1111 两个都是0才是0 A ^ B = 0011 0011 两个相同才为0 ~B = 1111 0000 B的取反 位移运算 0000 0010 2
阅读全文
摘要:float 浮点数,有限,离散,存在舍入误差(四舍五入),大约,接近但不等于; float a = 10111111111111111f; float b = a + 1; sout(a==b); 输出结果为true 因此无法表示准确数字; char 字符(不是字符串)本质还是数字 char a =
阅读全文
摘要:| # 一个'#'一级标题 | | | | ## 两个'#'二级标题 | | | | ###### 最多六级标题 | | | | ## 字体 | | | | Hello World! | | | | Hello World! | | | | Hello World! | | | | Hello Wo
阅读全文