मराठी

Which of the following is not true with regards to a switch statement? - Computer Applications

Advertisements
Advertisements

प्रश्न

Which of the following is not true with regards to a switch statement?

पर्याय

  • Checks for an equality between the input and the case labels

  • Supports floating point constants

  • Break is used to exit from the switch block

  • Case labels are unique

MCQ

उत्तर

Supports floating point constants

Explanation:

  • The switch statement in Java does not support floating point constants (float or double) as case labels.
  • It only supports char, byte, short, int, their corresponding wrapper classes, and String and enum types.
shaalaa.com
Introduction of Conditional Statements in Java
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2024-2025 (April) Specimen Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×