Question: What output is produced by the following code fragment? int limit = 500, num1 = 20, Num2 = 20; If (limit

What output is produced by the following code fragment?

int limit = 500, num1 = 20, Num2 = 20;

If (limit <= 100)

{

If (num1 == num2)

System.out.print(lemon);

System.out.print(orange);

}

System.out.println(grape);

a) grape

b) orange grape

c) lemon grape

d) lemon orange grape

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!