Menu
Question Index
...

Which one of the following declaration is wrong ?


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

Doubts

Problems

Topic: Java Bounded Type - Bounded Type In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App