package day05; import java.util.Arrays; //fill sort equals public class testArrays { public static void main(String[] args) { //print arrays' elements int[] arrays = new int[4]; arrays[0]=1; arrays[3]=4; System.out.println(Arrays.toString(arrays)); for(int e :arrays){ System.out.print(e+" "); } System.out.println(); //sort arrays' element Arrays.sort(arrays); System.out.println(Arrays.toString(arrays)); //fill the arrays Arrays.fill(arrays,1,3,666); System.out.println(Arrays.toString(arrays)); } }