What will be the result of attempting to compile the following code?.
public class Main { public static void main(String[] args) { List<Integer> glst1 = new ArrayList(); //(1) List nglst1 = glst1; //(2) List nglst2 = nglst1; //(3) List<Integer> glst2 = glst1; //(4) } }
Select the one correct answer.
(b)
The compiler issues an unchecked conversion warning in (1), as we are assigning a raw list to a generic list.