Bounded Types2771 - Java Quiz Question


Which one of the following declaration is wrong ?


A
Set<? extends Number> setOfAllSubTypeOfNumber = new HashSet<Integer>();
B
Set<? extends Number> setOfAllSubTypeOfNumber = new HashSet<Float>();
C
Set<? extends Number> setOfAllSubTypeOfNumber = new HashSet<Double>();
D
Set<? extends Number> setOfAllSubTypeOfNumber = new HashSet<String>();
E
All are correct