摘要: 阅读全文
posted @ 2023-11-08 19:56 news_one 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 一、前言 代码: //给定一个数组 int[] arr = {234,312,32,1321,321,43}; int[] arr1 = new int[6]; int[] arr2 = {1,3,7,8,32,432,432}; 二、复制 1、arraycopy完成数组的复制 //复制arr源数组 阅读全文
posted @ 2023-11-08 16:09 news_one 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 一、数组 1、indexOf int targetIndex = indexOf(arr, targetValue); public static int indexOf(int[] arr,int targetValue){ int index = -1; for(int i = 0; i < a 阅读全文
posted @ 2023-11-08 16:03 news_one 阅读(36) 评论(0) 推荐(0) 编辑