摘要: 第一种(用递归) public static int step(int n){ if(n < 1){ throw new IllegalArgumentException("n不能小于1。"); } if(n == 1 || n == 2){ return n; } return step(n - 阅读全文
posted @ 2021-03-15 15:36 卡卡罗特琪琪 阅读(1065) 评论(0) 推荐(1) 编辑
摘要: 上代码 public class Exam4 { public static void main(String[] args) { int i = 1; String str = "hello"; Integer num = 200; int[] arr = {1,2,3,4,5}; MyData 阅读全文
posted @ 2021-03-15 10:49 卡卡罗特琪琪 阅读(90) 评论(0) 推荐(0) 编辑