How to Pause The Screen Temporary

Hi Does any one know how to temporary pause the screen to view output before pressing the enter key or any key to continue to the next output screen for Java programs?Please reply soon.Much help appreciated.
[235 byte] By [egan128a] at [2007-10-3 2:14:16]
# 1
you could just read a line from the System.in
Wildcard82a at 2007-7-14 19:13:06 > top of Java-index,Java Essentials,New To Java...
# 2
How do you read a line from the System.in?
egan128a at 2007-7-14 19:13:06 > top of Java-index,Java Essentials,New To Java...
# 3
System.out.println("Press <Enter> to continue . . .");Scanner input = new Scanner(System.in);input.useDelimiter("\n");String garbage = input.next();
ValentineSmitha at 2007-7-14 19:13:06 > top of Java-index,Java Essentials,New To Java...
# 4
You're sending output via System.out.println and you want to pause so that the output doesn't scroll off the top of the page? Then you don't need any programming for that. Just pipe your output to the "more" program on the command line:java MyProgram | more
DrClapa at 2007-7-14 19:13:06 > top of Java-index,Java Essentials,New To Java...
# 5
"more" only advances one line at a time when <Enter> is pressed. :o)
ValentineSmitha at 2007-7-14 19:13:06 > top of Java-index,Java Essentials,New To Java...
# 6
> "more" only advances one line at a time when <Enter>> is pressed. :o)That's a feature that I never knew about. But when the space bar is pressed, it advances a full screen.
DrClapa at 2007-7-14 19:13:06 > top of Java-index,Java Essentials,New To Java...
# 7
Or, [s]he could use pg.
ValentineSmitha at 2007-7-14 19:13:06 > top of Java-index,Java Essentials,New To Java...
# 8
What about printscreen ? HAHA
Aknibbsa at 2007-7-14 19:13:06 > top of Java-index,Java Essentials,New To Java...