Hello. I'm having difficulty sorting an ArrayList of videogames based on their average rating. This is the code I have so far but it's not sorting correctly. And its messing up the indices. I have a class called RatingComparison that implements Comparator and sorts based on rating but I'm not sure how to implement it to sort my ArryList. Any help would be appreciated!
I tried doing Collections.Sort(games,new RatingComparison());
but I get this error:
I tried that but I get this error:
RedBox.java:82: cannot find symbol
symbol : method Sort(java.util.ArrayList<java.lang.Integer>,RatingComparison)
location: class java.util.Collections