简体   繁体   中英

Java generics ECLIPSE bug?

Is this a bug or what?

在此输入图像描述

Im using Eclipse and I keep getting this warning. Whats wrong with this...

在此输入图像描述

Check which List class you've imported. You've probably imported 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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM