Question: When I input the number 3, my output is Ready! 0 Go!.... what gives? import java.util.Scanner; public class ForLoops { public static void main (String

When I input the number 3, my output is "Ready! 0 Go!".... what gives?

import java.util.Scanner;

public class ForLoops { public static void main (String [] args) { int numVal; int i; Scanner input = new Scanner(System.in); numVal = input.nextInt(); System.out.println("Ready!"); for (i = numVal; i >= 1; i--); { System.out.println(i); } System.out.println("Go!");

} }

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!