摘要:
public class Demo05 { public static void main(String[] args) { int[][]array={{1,2},{2,3},{3,4},{4,5}}; printArray(array[0]); System.out.println(" "); 阅读全文
2024年4月21日
2024年4月20日
摘要:
public static void main(String[] args) { int [] arrays= {1,2,3,4,5}; printArrary(arrays); } //打印数组元素 public static void printArrary(int[] arrays){ for 阅读全文
摘要:
public class Dmo03 { public static void main(String[] args) { int [] arrays={1,2,3,4,5}; //打印全部的数组元素 for (int i=0;i< arrays.length;i++){ System.out.pr 阅读全文
2024年4月19日
摘要:
public static void main(String[] args) { System.out.println("欢迎来到简易计算器!"); Scanner scanner =new Scanner(System.in); System.out.println("请输入要计算的第一个数字:" 阅读全文
2024年4月18日
摘要:
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); } } 阅读全文
摘要:
public class Demo04 { public static void main(String[] args) { Demo04 demo04 =new Demo04(); demo04.test(1,2,3,4,5); } public void test (int ...i){ Sys 阅读全文