0
public class Testing {
    public static void main(String[] args) {
        List<? extends Integer> list = new ArrayList<>();
        list.add(new Integer(21));
    }

}

What is the compilation error in line#4?

Unheilig
  • 16,196
  • 193
  • 68
  • 98
Babu Reddy H
  • 186
  • 1
  • 11

0 Answers0