java - Upper bounded wildcard is causing compilation error -


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

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -