Multiple Choice Question

Quiz Guidelines

 

QID: 
155
Question: 

Consider the following code snippet:

XXXX m ;
switch( m ){
case 32 : System.out.println("32"); break;
case 64 : System.out.println("64"); break;
case 128 : System.out.println("128"); break;
}

What type can 'm' be of so that the above code compiles and runs as expected ?

Select 3 options

A. int m;
B. long m;
C. char m;
D. byte m;
E. short m;

Q&A Set: