Question:Which of the following is a valid switch statement?
switch (x) {
    case 1:
        break;
    default:
        break;
}
 

A Yes 

B No, it's incomplete 

C No, break cannot be used in case 

D No, default must come first 

+ Answer
+ Report
Total Preview: 28

Copyright © 2024. Powered by Intellect Software Ltd