摘要:
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)
浙公网安备 33010602011771号