I want to sort the numbers so that the output is: [12,9,8,7,5,4,3,1] Please help ;)
int[] array = new int[]{8,5,3,7,9,12,4,1};
int biggest = 0;
for (int i =0; i<array.length;i++){
if(array[i]>biggest){
biggest = array[i];
}
}
System.out.println(biggest); //Outputs 12