In the main, whenever I call this method to sort the array, it stops as if it's waiting for a response. Any idea why it's not working?
public void bubbleSort(){
    boolean finished = false;
    boolean swapOccurred = false;
    int i = 0;
    int next = i + 1;
    while (finished == false)
    {
        for (; i < theArray.length - 1; i++)
        {
            if (theArray[i] > theArray[next])
            {
                swapValues(theArray[i], theArray[next]);
                swapOccurred = true;
            }
        }
        if (swapOccurred == false)
        {
            finished = true;
        }
    }
}
private void swapValues(int i, int next) {
    int temp;
    temp = i;
    i = next;
    next = temp;
}
 
     
     
    