java - Upper bounded wildcard is causing compilation error -
this question has answer here:
public class testing { public static void main(string[] args) { list<? extends integer> list = new arraylist<>(); list.add(new integer(21)); } } what compilation error in line#4?
Comments
Post a Comment