Which of the following data type cannot be used with switch case construct?
Advertisements
प्रश्न
Which of the following data type cannot be used with switch case construct?
विकल्प
int
char
String
Double
MCQ
Advertisements
उत्तर
Double
Explanation:
- The data type double is incompatible with all versions of Java.
- There's a doubt. The string data type is also not usable in Java versions prior to 7.0, but it works in switches from 7.0 and above.
shaalaa.com
Introduction of Conditional Statements in Java
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
