Question: I keep recieving this error (The type Sorter is not generic; it cannot be parameterized with arguments ) What the problem? Here is the Code...

I keep recieving this error (The type Sorter is not generic; it cannot be parameterized with arguments )

What the problem?

Here is the Code...

import java.util.Comparator; import java.util.List;

public class InsertionsortSorter implements Sorter {

public void sortList(List records, Comparator comparator) { int j; Record key; int i;

for (j = 1; j < records.size(); j++) { key = records.get(j); for (i = j - 1; (i >= 0) && comparator.compare(key, records.get(i)) < 0; i--) { records.set(i + 1, records.get(i)); }

records.set(i + 1, key); } } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!