I have a ArrayList generic wildcards type, which is taking Number as extends. I am trying to add the integer values to the ArrayList.
Buts it\'s giving me an error
you can use;
ArrayList super Number> numberList = new ArrayList(); Number number = 1; numberList.add(number); or numberList.add(1);