Question: Consider the Java code segment below: int ans = 0 ; int check = 2 ; switch ( check ) { case 1 : ans
Consider the Java code segment below:
int ans ;
int check ;
switch check
case : ans;
case : ans;
case : ans;
default: ans;
What is the value of ans after execution of the code segment?
Selected answer will be automatically saved. For keyboard navigation, press
updown arrow keys to select an answer.
a
b
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
