SOLUTION FOUND!
I'm trying to find a way how to implement this code.
What I need to do is to find fast methods to rearrange the array, so that all cheese objects would be a part of the first part of the array and all milk objects are in the middle of the array and bread objects are at the end.
Any help here?
public class Shop {
enum shoppingList {cheese, milk, bread};
public static void rearrange (shoppingList[] shopping) {
shoppingList cheese = shoppingList.cheese;
shoppingList milk = shoppingList.milk;
shoppingList bread = shoppingList.bread;
}
}