Under what circumstances ,the compiler will generate unchecked warning? I know assign a parameterized type to a raw type and will give warning but List<? extends Comparale> will occur a warning? Generally we use List<? extends Comparale<String>> or other
I am not sue what you mean by unchecked warning. When you use legacy code like List list = new ArrayList(); and add stuff to this list that might generate warnings. Or when you pass parameterized data to a function that accepts a List list then you might get a warning. When you use generics with collections you will not get warnings. When you mix them with legacy code, watch out.
Compile error is when your code does not compile and no .class file is created
Compile with warning is when the compiler tells you that the code that you have written could be risky but it generates a .class file anyway. There are no errors. The warnings are displayed on the console.
Compile without warning is when the compiler is fine with the way you have written the code and generates a .class file. There are no errors and no warnings.