Practice Test Geeks home

OCP Generics and Collections 2

What is the result of compiling and running the following code?
```java

List list = new ArrayList<>();

list.add("A");

List objList = list;

objList.add(42);

System.out.println(list.get(1));

```

Select your answer