The first case is similar to:
This is OK as long as you don't add elements through l.
The second case is equivalent to:
The problem in this case is that you don't know what type of elements are already in the object pointed to by the non-generic List reference l. You could have added something that is not a
String prior to the assignment in line // 1, and the compiler is warning you about that possibility.