public static void sort(int[] array) {

        if (array != null && array.length > 1) {
            for (int maxIndex = array.length-1; maxIndex > 0; maxIndex--) {
                for (int currentIndex = 0; currentIndex < maxIndex; currentIndex++ ) {
                    if (array[currentIndex] > array[currentIndex+1]) {
                        swap(array, currentIndex, currentIndex+1);
                    }
                }
            }
        }
    }