Question: What is wrong, logically , with the following code? if ) > ( 1 0 System.out.println ( Large ) ; else if )
What is wrong, logically with the following code?
if System.out.printlnLarge;
else if && System.out.printlnMedium;
else if && System.out.printlnSmall;
else System.out.printlnVery small";
There is no logical error, but there is no need to have in the second conditional or
in the third conditional
There is no logical error, but there is no need to have in the second conditional or in the third conditional
The logical error is that no matter what value is "Very small" is always printed out
The logical error is that no matter what value is "Large" is always printed out
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
