Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP 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: 49734
69
  • 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