[英]Java generics ECLIPSE bug?
Is this a bug or what? 这是一个错误还是什么?
Im using Eclipse and I keep getting this warning. 我正在使用Eclipse,我一直收到这个警告。 Whats wrong with this...
这有什么不对......
Check which List
class you've imported. 检查该
List
已经导入类。 You've probably imported java.awt.List
. 你可能已经导入了
java.awt.List
。
What you see is a compilation error, not a mere warning (a warning would not cause compilation to fail). 您看到的是编译错误,而不仅仅是警告(警告不会导致编译失败)。
And no, its very unlikely to be a bug in eclipse. 不,它不太可能成为日食中的一个错误。 Probably, the type
List
really doesn't declare any type parameters, because you have imported java.awt.List
instead of java.util.List
. 可能,类型
List
实际上没有声明任何类型参数,因为您已导入java.awt.List
而不是java.util.List
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.