摘要: ### System.out.printf() * %d 指定输出整型 * %s 指定字符串类型 * %.2f 浮点数字的格式 ![](https://img2023.cnblogs.com/blog/1202393/202305/1202393-20230525172400638-18576132 阅读全文
posted @ 2023-05-25 17:24 盘思动 阅读(73) 评论(0) 推荐(0)
摘要: * 注意:removeAll不是差集 ``` import java.util.ArrayList; public class ImoocStudent { public static void main(String args[]){ ArrayList objArray = new ArrayL 阅读全文
posted @ 2023-05-25 16:16 盘思动 阅读(94) 评论(0) 推荐(0)
摘要: * 在 Java 中,我们可以使用 ArrayList 来定义不固定长度的数组,因为 ArrayList 内部使用了一个动态数组来存储元素。 * arrayList 是动态数组 * 添加数组 ``` ArrayList intList = new ArrayList(); intList.add(1 阅读全文
posted @ 2023-05-25 15:14 盘思动 阅读(1337) 评论(0) 推荐(0)
摘要: ``` import java.util.*; public class ImoocStudent { public static void main(String args[]){ int array[] = new int[6]; Arrays.fill(array,100); for (int 阅读全文
posted @ 2023-05-25 14:34 盘思动 阅读(18) 评论(0) 推荐(0)
摘要: * 以下实例演示了如何通过 Collections 类的 Collections.max() 和 Collections.min() 方法来查找数组中的最大和最小值: ``` import java.util.Arrays; import java.util.Collections; public 阅读全文
posted @ 2023-05-25 14:12 盘思动 阅读(190) 评论(0) 推荐(0)
摘要: ![](https://img2023.cnblogs.com/blog/1202393/202305/1202393-20230525141048380-104280220.png) 阅读全文
posted @ 2023-05-25 14:10 盘思动 阅读(25) 评论(0) 推荐(0)
摘要: ![](https://img2023.cnblogs.com/blog/1202393/202305/1202393-20230525113339532-864642955.png) 阅读全文
posted @ 2023-05-25 11:33 盘思动 阅读(9) 评论(0) 推荐(0)
摘要: ``` public static void main(String args[]){ int[] source = {1,2,3,4,5,6,7}; int[] target = new int[5]; System.arraycopy(source,0,target,0,5);// 6,7超出5 阅读全文
posted @ 2023-05-25 11:32 盘思动 阅读(32) 评论(0) 推荐(0)
摘要: ![](https://img2023.cnblogs.com/blog/1202393/202305/1202393-20230525112115020-246459675.png) 阅读全文
posted @ 2023-05-25 11:21 盘思动 阅读(10) 评论(0) 推荐(0)
摘要: ``` import java.util.ArrayList; import java.util.Vector; import java.util.Arrays; public class ImoocStudent { public static void main(String args[]){ 阅读全文
posted @ 2023-05-25 11:11 盘思动 阅读(73) 评论(0) 推荐(0)
摘要: ``` import java.util.ArrayList; import java.util.Vector; public class ImoocStudent { public static void main(String args[]){ long startTime = System.c 阅读全文
posted @ 2023-05-25 10:12 盘思动 阅读(29) 评论(0) 推荐(0)
摘要: ``` import java.util.StringTokenizer; public class ImoocStudent { public static void main(String args[]){ for(int i = 1;i < 9 ; i++){ for(int j = 1;j 阅读全文
posted @ 2023-05-25 09:47 盘思动 阅读(37) 评论(0) 推荐(0)