Win a copy of The Java Performance Companion this week in the Performance forum!
    Bookmark Topic Watch Topic
  • New Topic

Problem extending the LinkedList class

 
Andrew Gray
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hey I'm currently trying to sort a LinkedList when I add a new object to it. However for some reason in my SortedList class I get an error: cannot find symbol - method compareTo(java.lang.Object).
The objects i'm using in my array extend the comparable class. Have I declared it wrong?

public class SortedList<E extends Comparable<? super E>> extends LinkedList
{

...

}
 
Andrew Gray
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Report post to moderator
Really in need of some help.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49411
62
  • Mark post as helpful
  • send pies
  • Report post to moderator
Welcome to JavaRanch

Please don't ask the same question twice. Closing thread.
 
    Bookmark Topic Watch Topic
  • New Topic