Q:

Sorting an array from least to greatest

I'm trying to sort an array from greatest to least using compareTo(), and the results aren't quite right.
public void insert(C data){ 
    arr[currentSize++] = data; // <-- currentSize is initialized to 0 before this
    C temp;
    for(int i = 0; i < currentSize-1; i++) {
        if(arr[i].compareTo(arr[i+1]) < 0) {
            temp = arr[i];
            arr[i] = arr[i+1];
            arr[i+1] = temp;
        }
    }       

}

An example is an input of:
[0.32371583205781573, 0.8906211866288234, 0.5288455608245172, 0.9170569745456318, 0.5103102992069214]
With an output of:
[0.9170569745456318, 0.5288455608245172, 0.5103102992069214, 0.32371583205781573, 0.8906211866288234]
I tried running through it backwards below, and the result was still incorrect:
    public void insert(C data){ 
    arr[currentSize++] = data;
    C temp;
    for(int i = currentSize-1; i > 0; i--) {
        if(arr[i].compareTo(arr[i-1]) < 0) {
            temp = arr[i];
            arr[i] = arr[i-1];
            arr[i-1] = temp;
        }
    }       

}

The code is tested with:
int n = 5;
        PQ<Double> pq1 = new PQasSortedArray<Double>(n);
        double[] arr1 = new double[n];

    for(int i = 0; i < n; i++){
        Random num = new Random();
        arr1[i] = num.nextDouble();
    }

    for (int i=0; i < arr1.length; i++){
        pq1.insert(arr1[i]);
    }

A:

The way you've written this is to always "insert" the new item at the end of the array, then attempt to bubble-sort it into place, however, your bubble sort only makes one pass, and at best the new item, which starts at the last position, will move into the second-to-last position.
If you really want to add the new element into the last position, then you should change the for loop so it starts at the last element and works backward to the first. That will cause it to keep bubbling the new element up until it reaches the correct position.
However, a far more efficient way to do this is to find the right position for the new element first, then insert it there.

Easy way: just loop through the existing elements starting at index 0 until you find one that's less than the new value (remember we're sorting greatest to least), then insert the new element before that one.
Faster way: implement a binary search by starting in the middle. If the element in the middle is greater than the new element, then you know the new element should be in the second half of the array, otherwise it's in the first half. Then go to the middle of the selected half and go through the same process again, until you have found the right place.

Java has a function for performing a binary search: Arrays.binarySearch. However, you'll have to give it a custom comparator that reverses the normal comparison logic for C.
Update: This implementation of the less-efficient first strategy works. I implemented in terms of Comparable since we don't really care what C is, only that it's Comparable.
public void insert(Comparable data){
    arr[currentSize] = data; // <-- currentSize is initialized to 0 before this
    for(int i = currentSize; i > 0; i--) {
        if(arr[i].compareTo(arr[i-1]) > 0) {
            Comparable temp = arr[i];
            arr[i] = arr[i-1];
            arr[i-1] = temp;
        }
    }
    currentSize++;
}

Much faster implementation:
public void insert(Comparable data) {
    int position = Arrays.binarySearch(arr, 0, currentSize, data, (left, right) -> right.compareTo(left));
    if (position < 0)
        position = -position - 1;
    System.arraycopy(arr, position, arr, position + 1, currentSize - position);
    arr[position] = data;
    currentSize++;
}

