I don't know how to pass the entire array of objects to my method. I keep getting errors when I try. Here is how I attempt to pass it.
The problem is with the next line which should not be inside the main() method. Eg it should appear after main() the way you had it in #5.
Code:
public static void main(String[] args) {
// etc
sortPrice(arr);
}
private void sortPrice(Item[] arr) {
// TODO
}
Comment