java1 prepration

find min max array :-   public static void findMinMax(int[] arr){ int min=arr[0]; int max=arr[0]; for(int ii=0;ii<arr.length;ii++){ if(arr[ii]<min){ min=arr[ii]; } else if(arr[ii]>max){ max=arr[ii]; } } System.out.println(“The minimum in the arr::”+min); System.out.println(“The maximum in the arr::”+max);

Read more