Forums Register Login
Compile Xlint Errors
Hi Guys,

I am in the process of following a tutorial from the head first JSP & servlets book and i have got stuck. Hopefully someone will be able to help me.

I have copied this code from the book

When i come to compile the code i get this message in the terminal

After i recompile with -Xlint i get these messages

Does anyone have any idea where i am going wrong?

They aren't errors but warnings.

If you read this part of the Java Tutorial I'm sure you'll get a better understanding.
Hi Ben,


public List getBrands(String color) {


public List<String> getBrands(String color) {


List brands = new ArrayList();


List<String> brands = new ArrayList<String>();

and your warnings will vanish. The problem has to do with generics, which are introduced
since Java Version 1.5

Kind regards
Thank you worked like a charm.

You can't expect to wield supreme executive power just because
Become a Java guru with IntelliJ IDEA

This thread has been viewed 1077 times.

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2019 10:47:09.