Shortest way to find the biggest integer in a row in a list[JAVA] : I want to print the numbers so that the output is: [12,9,8,7,5,4,3,1]
The problem is, i only know how to print the biggest.
I hope you guys can help me :)

    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