import java.util.*; public class Demo3 { public static void main(String[] args) { int[] a={1,2,3}; add(a); System.out.println(add[0]; int[] b={4,6,1,9,2}; sort(b); for (int num :array ) { System.out.println(num); } System.out.println(); } public static void add(int[] array){ array[0]++; System.out.println(array[0]); } public static void sort(int[] array){ for(int i=0;i<array.length-1;i++){ for(int j=0;j<=array.length-i-1;j++){ if(array[j]>array[j+1]){ int num=array[j]; array[j]=array[j+1]; array[j+1]=num; } } } } public static int[] span(int[] array){ array=Arrays.copyOf(array,array.length+1); System.out.println(array.length);6 return array; } }