File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Generics - Function declaration syntax error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Generics - Function declaration syntax error" Watch "Generics - Function declaration syntax error" New topic
Author

Generics - Function declaration syntax error

kiran J Arudi
Greenhorn

Joined: Mar 24, 2010
Posts: 2

static <T extends Comparable<? super T>> List<T> merge(Collection<? extends T> c1,
Collection<? extends T> c2) {

}

The function declared as shown above results in a compiler error in the highlighted text as "List cannot be resolved to a type". Any ideas how to resolve this error?

Thank you!
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Import the List class?
kiran J Arudi
Greenhorn

Joined: Mar 24, 2010
Posts: 2
Silly me. David, Thank you, I had forgotten to import List package.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Generics - Function declaration syntax error