This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Problem extending the LinkedList class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

Problem extending the LinkedList class

Andrew Gray
Greenhorn

Joined: Oct 22, 2009
Posts: 9
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

Joined: Oct 22, 2009
Posts: 9
Really in need of some help.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36579
    
  16
Welcome to JavaRanch

Please don't ask the same question twice. Closing thread.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem extending the LinkedList class
 
Similar Threads
Generic Java, Type not bounded
New to Generics
Problem with generics
Really need help!
Unable to add object to array.