Which of the following statements are correct?A switch statement can act on numerical as well as Boolean types. A switch statement can act on characters, strings and enumerations types. We cannot declare variables within a case statement if it is not enclosed by { }. The foreach statement is used to iterate through the collection to get the desired information and should be used to change the contents of the collection to avoid unpredictable side effects. All of the expressions of the for statement are not optional.

- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
 
Which of the following statements are correct?A switch statement can act on numerical as well as Boolean types.
A switch statement can act on characters, strings and enumerations types.
We cannot declare variables within a case statement if it is not enclosed by { }.
The foreach statement is used to iterate through the collection to get the desired information and should be used to change the contents of the collection to avoid unpredictable side effects.
All of the expressions of the for statement are not optional.

1.1,2

2.2,3

3.3,5

4.4,5


More MCQS Questions and answers

R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!