S
S. Gregory
How do you create a pause in a Java application that requires you to
press a key to continue until the conditional statement is complete?
The folowing is what I have so far..
class Count{
public static void main(String[] arguments) throws Exception {
int a = 100;
int b = 20;
int x;
for (x = 0;x < a;x++) {
System.out.println((x+1) + "." + "Message goes here to be displayed
100 times.");
}
I would like the application to display 1 - 20 then pause and display
20 more and 20 more and so on. I tried to use System.in.read();, but
it only displayed two at a time. Please Help.
press a key to continue until the conditional statement is complete?
The folowing is what I have so far..
class Count{
public static void main(String[] arguments) throws Exception {
int a = 100;
int b = 20;
int x;
for (x = 0;x < a;x++) {
System.out.println((x+1) + "." + "Message goes here to be displayed
100 times.");
}
I would like the application to display 1 - 20 then pause and display
20 more and 20 more and so on. I tried to use System.in.read();, but
it only displayed two at a time. Please Help.