public void sortArray() {

        this.arrayAccess = 0;
        this.comparisions = 0;

        /**
         * Pass the array once. This time from the back so that the inner loop
         * works well.
         */
        for (int i = this.array.length - 1; i > 0; i--) {
            /**
             * The loop for the first iteration, moves the whole (array.length -
             * 1) locations and so on.
             */
            for (int j = 0; j < i; j++) {
                this.arrayAccess += 2;
                this.comparisions++;
                /**
                 * If the next value is greater than the current value, swap
                 * them. This will push the largest element in the last place
                 * and so on.
                 */
                if (isLesser(j + 1, j)) {
                    this.swapArrayValues(j + 1, j);
                }
            }

        }
    }