Question: Write for each letter (a-c) Yes, the if statement will execute or No, the if statement will not execute depending on the variables given. If
Write for each letter (a-c) Yes, the if statement will execute or No, the if statement will not execute depending on the variables given. If the statement does not execute, explain why. while((num1==num3 || num2==num3)&&(first.equals(second)||first.equals(third))||(first.equals(third)&&num3==nu m1)) { System.out.println("hello"); break; } a) int num1=3; int num2=4; int num3=5; String first="moon"; String second="sun"; String third="moon"; ------- b) int num1=3; int num2=4; int num3=5; String first="dog"; String second="sun"; String third="moon"; ------- c) int num1=3; int num2=3; int num3=3; String first="cat"; String second="cat"; String third="moon";
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
