java sort array list using bubblesort
问题 I have been working on this for the past 5 hours. for some reason I am not getting the result I am looking for. The method is supposed to sort an Arraylist of items by quantity using bubble sort. Not sure if I am making a mistake but it seems to only sort the first few items and just lists the rest as they are and not in order. Here is the code public static void bubblesrt(ArrayList<Drinks> list) { Drink temp; if (list.size()>1) // check if the number of orders is larger than 1 { for (int x=0