摘要: ##1,稀疏数组的介绍 ##2,练习 ##3,编码 package array; /* 稀疏数组 数据结构 */ public class Demo08 { public static void main(String[] args) { // 创建一个二维数组;11*11 0:没有棋子 1:黑棋 阅读全文
posted @ 2021-07-30 19:25 阿向向 阅读(31) 评论(0) 推荐(0) 编辑
摘要: package array; import java.util.Arrays; /* 冒泡排序 */ public class Demo07 { final static int[] result={4,564,54,54,5,4,54,54,54,54,54,65,46,58,7,54,67,8, 阅读全文
posted @ 2021-07-30 18:46 阿向向 阅读(298) 评论(0) 推荐(0) 编辑
摘要: package array; import java.util.Arrays; public class Demo06 { final static int[] a = {1, 2, 13, 45, 45, 8, 4, 5465, 46, 54, 564, 1, 999, 54, 1, 54, 12 阅读全文
posted @ 2021-07-30 18:03 阿向向 阅读(37) 评论(0) 推荐(0) 编辑
摘要: package array; public class Demo05 { // 4行2列 // [4][2] /* 1,2 array[0] 2,3 array[1] 3,4 array[2] 4,5 array[3] */ final static int[][] array = {{1, 2}, 阅读全文
posted @ 2021-07-30 12:50 阿向向 阅读(89) 评论(0) 推荐(0) 编辑
摘要: package array; public class Demo04 { final static int[] arrays = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; public static void main(String[] args) { printArray( 阅读全文
posted @ 2021-07-30 12:14 阿向向 阅读(60) 评论(0) 推荐(0) 编辑
摘要: package array; public class Demo03 { public static void main(String[] args) { int[] arrays = {1, 2, 3, 4, 5, 6,7, 8, 9, 10, 11, 12, 13, 14}; test(); p 阅读全文
posted @ 2021-07-30 08:32 阿向向 阅读(72) 评论(0) 推荐(0) 编辑
摘要: package array; /** * 数组的三种初始化 */ public class Demo02 { public static void main(String[] args) { test(); test2(); } public static void test2() { int[] 阅读全文
posted @ 2021-07-30 08:30 阿向向 阅读(75) 评论(0) 推荐(0) 编辑
摘要: package array; public class Demo01 { public static void main(String[] args) { test(); test3(); } public static void test() { int[] num1;//定义 声明数组 num1 阅读全文
posted @ 2021-07-30 08:29 阿向向 阅读(27) 评论(0) 推荐(0) 编辑
摘要: package method; /* 可变参数; 不定项;‘ */ public class Demo03 { public static void main(String[] args) { Demo03 demo03 = new Demo03(); demo03.test(1,2,3,4,7,5 阅读全文
posted @ 2021-07-30 08:28 阿向向 阅读(45) 评论(0) 推荐(0) 编辑
摘要: package method; /** * 阶乘 * <p> * <p> * 1! 1 * 2! 2*1 * 3! 3*2*1 * 5! 5*4*3*2*1 */ public class Demo06 { public static void main(String[] args) { Syste 阅读全文
posted @ 2021-07-30 08:26 阿向向 阅读(101) 评论(0) 推荐(0) 编辑
摘要: package method; public class Demo04 { public static void main(String[] args) { Demo04 demo04 = new Demo04(); demo04.printMax(456,454,4654.4,6.454,6544 阅读全文
posted @ 2021-07-30 08:23 阿向向 阅读(83) 评论(0) 推荐(0) 编辑
摘要: package method; public class Demo01 { public static void main(String[] args) { // 实参 int sum = add(1, 4); System.out.println(sum);//5 // int max = max 阅读全文
posted @ 2021-07-30 08:21 阿向向 阅读(8) 评论(0) 推荐(0) 编辑