Page 1 of 1

What would be printed if the method caughtSpeeding was called from main as follows: Note: there are no errors in this co

Posted: Sat May 14, 2022 4:35 pm
by answerhappygod
What Would Be Printed If The Method Caughtspeeding Was Called From Main As Follows Note There Are No Errors In This Co 1
What Would Be Printed If The Method Caughtspeeding Was Called From Main As Follows Note There Are No Errors In This Co 1 (33.49 KiB) Viewed 40 times
What would be printed if the method caughtSpeeding was called from main as follows: Note: there are no errors in this code int result - caughtSpeeding(75, false); if (result 0){ System.out.println("No ticket"); } else if (result 1) { System.out.println("Lower fine"); } else { System.out.println("Higher fine"); } public static int caughtSpeeding(int speed, boolean isBirth if(speed > 65 && speed <= 85 && isBirthday) { return 0; } ir speed 3= 66 but shirthday ) return 21 3 it (speed <= 65 && isBirthday) { return 8; 1 * (speed > 60 && speed - 80) { return 1; 1 if (speed >= 81) { > return 2; } else { return; }