What is the output of the following code?
import java.util.*; <br>
public class Test { <br>
public static void main(String[] args) { <br>
List<String> list = Arrays.asList("A", "B", "C"); <br>
list.add("D"); <br>
} <br>
}
-
A
Compilation error
-
B
Runtime error
-
C
The list will contain ["A", "B", "C", "D"]
-
D
The list will contain ["A", "B", "C"] and "D" will not be added