+ 3
JAVA
What is the output of the following code? int a = 11; int b = 12; int c = 40; if (a > 100 || b > 3) { System.out.println(a); } else { System.out.println(c); }
4 Answers
+ 24
|| , OR returns true if any of the expressions evaluates to true
a>100||b>3 is same as
false||true
true
//hence print value of a
+ 4
11
You can also write and save you code as below:
https://code.sololearn.com/cK7GYX8el3hO/?ref=app
+ 3
11
i don't speak java
0
11