摘要: 阅读全文
posted @ 2021-04-30 09:34 HeartlessHero 阅读(38) 评论(0) 推荐(0)
摘要: 1 package com.pingfan.array; 2 3 public class ArrayDemo2 { 4 public static void main(String[] args) { 5 //静态初始化:创建 + 赋值 6 int[] a ={1,2,3,4,5,6,7,8}; 阅读全文
posted @ 2021-04-29 23:47 HeartlessHero 阅读(49) 评论(0) 推荐(0)
摘要: 1 package com.pingfan.array; 2 3 public class ArrayDemo1 { 4 public static void main(String[] args) { 5 int[]nums;//1.声明一个数组 6 nums = new int[10];//2. 阅读全文
posted @ 2021-04-29 23:27 HeartlessHero 阅读(132) 评论(0) 推荐(0)
摘要: 1 package com.pingfan.method; 2 3 public class Demo3 { 4 public static void main(String[] args) { 5 System.out.println(f(5)); 6 } 7 public static int 阅读全文
posted @ 2021-03-26 22:01 HeartlessHero 阅读(24) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-03-25 22:03 HeartlessHero 阅读(13) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-03-25 21:55 HeartlessHero 阅读(13) 评论(0) 推荐(0)
摘要: 11行and29行处为方法的重载 阅读全文
posted @ 2021-03-25 21:13 HeartlessHero 阅读(17) 评论(0) 推荐(0)
摘要: 1 package com.pingfan.method; 2 3 public class Demo2 { 4 public static void main(String[] args) { 5 int max = max(10,20); 6 System.out.println(max); 7 阅读全文
posted @ 2021-03-25 20:57 HeartlessHero 阅读(41) 评论(0) 推荐(0)
摘要: 1 package com.pingfan.method; 2 3 public class Demo1 { 4 //main方法 5 public static void main(String[] args) { 6 //int sum = add(1,2); 7 // System.out.p 阅读全文
posted @ 2021-03-23 17:26 HeartlessHero 阅读(50) 评论(0) 推荐(0)
摘要: 1 package com.pingfan.struct; 2 3 public class TestDemo { 4 public static void main(String[] args) { 5 //打印三角形5行 6 for (int i = 1; i <= 5; i++) { 7 fo 阅读全文
posted @ 2021-03-23 16:46 HeartlessHero 阅读(51) 评论(0) 推荐(0)