摘要: next 结果输出 Hello nextline 结果输出 Hello World 区别 注意 IO流(计算机输入和输出)最后要关闭不然会占用资源导致电脑卡 阅读全文
posted @ 2021-10-04 17:22 蔡蔡ming 阅读(37) 评论(0) 推荐(0)
摘要: 方法 下面先定义方法(函数)然后上面再进行调用 方法的重载 方法名必须相同,但后面的参数列表不能相同(可以是个数不同或类型不同或排列顺序不同) public static int max(int a ,int b){} public static int max(double a double b) 阅读全文
posted @ 2021-10-04 17:19 蔡蔡ming 阅读(52) 评论(0) 推荐(0)
摘要: while do{}while() 至少执行一次(先执行后判断) while() 先判断后循环 for循环 100.for=for(int i;i<100;i++);(idea快捷) 九九乘法表 for (int j = 1; j <= 9; j++) { for (int i = 1; i <= 阅读全文
posted @ 2021-10-04 17:13 蔡蔡ming 阅读(38) 评论(0) 推荐(0)
摘要: public static void main(String[] args) { System.out.println(f(5));} public static int f(int n) { if(n==1){ return 1; }else{ return n*f(n-1); } }5!=5*4 阅读全文
posted @ 2021-10-04 17:12 蔡蔡ming 阅读(9) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-10-04 17:11 蔡蔡ming 阅读(10) 评论(0) 推荐(0)
摘要: public static void main(String[] args) { int[][] a=new int[11][11]; a[1][2]=1; a[2][3]=2; for (int[] ints : a) { for (int anInt : ints) { System.out.p 阅读全文
posted @ 2021-10-04 17:08 蔡蔡ming 阅读(19) 评论(0) 推荐(0)
摘要: 整型 :整数 int 4字节 long 8字节 int a=1 long类型在数字后面加L 如:long num1 = 10L byte 1字节 short 2字节 整型扩展 二进制开头0b int a=0b10 =2 八进制开头0 int a=010 =8 十六进制开头0x int a=0x10 阅读全文
posted @ 2021-07-06 17:27 蔡蔡ming 阅读(42) 评论(0) 推荐(0)
摘要: 一级标题 几个#几级标题 字体 两个星号粗体hello world 一个星号斜体hello world 三个星号粗斜hello world 两个波浪线hello world 引用 大于号引用 分割线 或*** 图片 超链接 跳转到XXX 列表 A(1.后面加空格) B C A(-空格) B C 表格 阅读全文
posted @ 2021-07-05 12:26 蔡蔡ming 阅读(37) 评论(0) 推荐(0)