A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Java in General
Author
Generics - Function declaration syntax error
kiran J Arudi
Greenhorn
Joined: Mar 24, 2010
Posts: 2
posted
Apr 06, 2010 03:13:16
0
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
I like...
posted
Apr 06, 2010 05:09:50
0
Import the List class?
kiran J Arudi
Greenhorn
Joined: Mar 24, 2010
Posts: 2
posted
Apr 08, 2010 02:56:25
0
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
Similar Threads
Compiling multiple source files.
Generics ? declaration spot
Overriding and Overloading
Generic methods doubt # 2
Generic methods and generic parameters
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter