Give output of: int m = ( ( 3+2) % 3 < (2*2) % 3) ? 5%2 : 6:3 ); System.out.println(m);
Answers
Answered by
0
Answer:
1 is the output
Explanation:
first we will convert this to if else
it will be
if( ( ( 3 + 2 ) % 3 ) < ( (2*2) % 3 ) ){
int m = 5%2
}
else{
int m = 6%3;
}
by solving if statement the condition evaluates to true then the of part will be executed. then m = 5%2 = 1
Similar questions
Math,
2 months ago
Math,
2 months ago
Computer Science,
2 months ago
Math,
5 months ago
Social Sciences,
5 months ago
English,
10 months ago
Science,
10 months ago
Biology,
10 months ago