ECLIPSE errors in Java generation?

Is this a mistake or what?

enter image description here

I am using Eclipse and I keep getting this warning. What is wrong with this ...

enter image description here

+4
source share
2 answers

Check which List class you imported. You probably imported java.awt.List .

+10
source

What you see is a compilation error, and not just a warning (warning will not lead to compilation failure).

And no, this is unlikely to be a mistake in the eclipse. The List type probably does not declare any type parameters, because you imported java.awt.List instead of java.util.List .

+6
source

Source: https://habr.com/ru/post/1381995/


All Articles