标签:stat com print 组元 ack fill 填充 nbsp pac
1 package com.pingfan.array; 2 3 import java.util.Arrays; 4 5 public class ArrayDemo6 { 6 public static void main(String[] args) { 7 int[] a = {1,2,3,3643,45645646,666,785,3242342}; 8 // System.out.println(a);[I@1b6d3586 9 //打印数组元素Array.toString 10 //system.out.println(Arrays.toString(a)); 11 Arrays.sort(a);//数组进行排序:升序 12 System.out.println(Arrays.toString(a)); 13 Arrays.fill(a, 2,4,0);//数组填充:左闭右开 14 System.out.println(Arrays.toString(a)); 15 } 16 }
标签:stat com print 组元 ack fill 填充 nbsp pac
原文地址:https://www.cnblogs.com/HeartlessHero/p/14721405.html