When I try calling the bubbleSort method within the class I get "itemsPriority can not be resolved to a type."
<p>As a part II to an assignment I must implement a sort method (I've chosen a bubbleSort) to sort an array of priorities from user input. In my previous part I program I accomplished this without a sort, by keeping track of what index the priority was assigned to. </p>

<p>I've been trying to implement a bubblesort in my ShoppingList class with plans to call the sort from my GoShopping (main) class. However this does not seem to be working, most likely because I am very new to Java.</p>

<p>When I try calling the bubbleSort method within the class I get itemsPriority can not be resolved to a type. I'm greatful for any advice.</p>

<pre><code>public class ShoppingList  
public ShoppingList ()
{
    super();
}

private int[] itemsPriority = new int[7];

public void pry(int itemsPry, int index)
{
    itemsPriority[index] = itemsPry;
}
//run through the 2 arrays 7 times to give user their item and price
public int getPriorityItem(int i) //getItemAtPriority
{
    for(int j = 0; j&lt; 7;j++){
        if(i == itemsPriority[j]){
            return j;
        }
    }
    return -1;
}

public String getItemNameAtPriority(int i) {
    for(int j = 0; j&lt; 7;j++){
        if(i == itemsPriority[j]){
            return itemNames[j];
        }
    }
    return null;
}

//set itemPriority to use for shopping
public void setPriorityItem(int i, int PriorityItem) {
    this.itemsPriority[i] = PriorityItem;
public int getitemsPriority(int i){
    return itemsPriority[i];
}
public void bubbleSort(int[]itemsPriority) {
    boolean swapped = true;
    int temp;
    while (swapped) 
    {
        swapped = false;
        for (int i = 0; i &lt; itemsPriority.length - 1; i++) 
        {
            if (itemsPriority[i] &gt; itemsPriority[i + 1]) 
            {
                temp = itemsPriority[i];
                itemsPriority[i] = itemsPriority[i + 1];
                itemsPriority[i + 1] = temp;
                swapped = true;
</code></pre>
