Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ArrayList<Person> peopleList;
- ArrayList<Place> placeList;
- public static void sort(ArrayList list){
- sortList(list);
- }
- public static void sortList(ArrayList<Comparable> list)
- {
- //Code here
- }
- public static void sort(ArrayList<Comparable> list){
- sortList(list);
- }
- Error:(59, 14) java: method sort in class Sorts cannot be applied to given types;
- required: java.util.ArrayList<java.lang.Comparable>
- found: java.util.ArrayList<Passenger>
- reason: actual argument java.util.ArrayList<Passenger> cannot be converted to java.util.ArrayList<java.lang.Comparable> by method invocation conversion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement