You are likely importing java.awt.List
.
You should instead import java.util.List
, which is a parameterized type.
It seems like you are importing it from java.awt
:
import java.awt.List;
and it looks like you want to use the one from java.util
:
import java.util.List;
if you are working on Graphical user interface you have to
import java.awt.List
instead of import java.util.List
Other then else if you are working on simple code you have to import java.util.List;
instead of import java.awt.List
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With