File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 17276

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


Perfect World Programming, LLC - iOS Apps
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!