Give the output of the snippet:
int p = 9; while (p<=15) { p++; if(p== 10) continue; System.out.println(p); }
46 Likes
11 12 13 14 15 16
Answered By
22 Likes
Rewrite the snippet using Ternary operators:
if(a<b) { c=(a+b); } else { c=(a-b); }
int a=10,b=12; if(a==10&&b<=12) a--; else ++b; System.out.println(a + "and" +b);
Predict the output:
int a=6,b=5; a += a++ % b++ *a + b++* --b;