Trolli C.
asked 04/04/19
What is output by the code below?
int a = 75, b = 100;
if( a > 90)
if( b > 100)
out.print("go");
else if( b > 90)
out.print("it");
else
out.print("up");
out.print("on");
Joshua C.
answered 04/07/19
Software Engineer in Bay Area
# only "on" would be printed out, assuming every line is in the first "if" block except for out.print("on").
# Since (a > 90) is false, nothing inside the block matters.
Still looking for help? Get the right answer, fast.
OR
Find an Online Tutor Now
Choose an expert and meet online.
No packages or subscriptions, pay only for the time you need.