Consider the code:
public abstract class Item implements Comparable
{
protected T item;
public int compareTo(T o)
{
re
Just change the class like follow:
public class MyItem extends Item implement Comparable>
{
T object;
}
Or
public abstract class Item implements Comparable>
{
protected T item;
public int compareTo(MyItem o)
{
return 0; // this doesn't matter for the time being
}
}
The error tips has shown us.Hope it helpful.