Science, asked by sharddha2699, 1 year ago

What gets printed when the following program is compiled and run?


Nick987: what program?

Answers

Answered by Ayano160
0
(String args[]){
int i, j=1;
i = (j>1)?2:1;
switch(i){
case 0: System.out.println(0); break;
case 1: System.out.println(1);
case 2: System.out.println(2); break;
case 3: System.out.println(3); break;
}
}
}
A. 0

B. 1

C. 2

D. 3

E. 1 2

Answer: Option E

HOPE IT IS HELPFUL
Similar questions