This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Generic Java, Type not bounded Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic

Generic Java, Type not bounded

Timothy Leong
Ranch Hand

Joined: May 25, 2005
Posts: 55
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

Joined: Feb 05, 2001
Posts: 17271

Duplicate thread. Check in the Java In General (Intermediate)


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: Generic Java, Type not bounded
It's not a secret anymore!