1 import java.util.*; 
2 public class BigIntDemo {
3 public static void main(String[] args) {
4 int t[]={3,5,6,7,34,23,2};
5 Arrays.sort(t);//数组排序
6 System.out.print("排序后的数组");
7 System.out.println(Arrays.toString(t));
8 int point=Arrays.binarySearch(t, 23);//检索数据位置
9 System.out.println("元素’23‘的位置在: "+point);
10 Arrays.fill(t, 3);//填充数组
11 System.out.print("数组填充:");
12 System.out.println(Arrays.toString(t));//以字符串形式输出
13 }
14
15 }

 

相关文章:

  • 2022-02-18
  • 2021-08-17
  • 2022-12-23
  • 2021-08-01
  • 2021-11-14
猜你喜欢
  • 2021-10-21
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-11
  • 2021-11-14
相关资源
相似解决方案