This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
    Bookmark Topic Watch Topic
  • New Topic

Generic Java, Type not bounded

 
Timothy Leong
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Report post to moderator
Dear guys,
I have declared LinkedList<Customer> LL = new LinkList<Customer> (); in my main class.

Under my class Customer, I have a compareTo method too.

I get an error on Type parameter customer is not within its bound.

I believe the problem lies with the bold portion of the code which sorts the node.

Can somebody guide me please? Thank in advance.

 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Report post to moderator
Duplicate thread. Check in the Java In General (Intermediate)

Mark
 
    Bookmark Topic Watch Topic
  • New Topic