wood burning stoves*
The moose likes Beginning Java and the fly likes ? about System.out.read() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "? about System.out.read()" Watch "? about System.out.read()" New topic

? about System.out.read()

Paul LaBrier

Joined: Apr 08, 2002
Posts: 21
I have a simple console application that I need to insert a pause in.
Basically I am wanting a "press any key to continu" type thing.
I thought that I should be able to do it with:
but I cannot seem to get it to work.
I tried searching the internet and could find very little on this topic.
Any suggestions?
Paul LaBrier
Snigdha Solanki
Ranch Hand

Joined: Sep 07, 2000
Posts: 128
Try this

The program will print Hello and then pause for user input. If you hit the enter key "World" will get printed on screen.
Hope this helps.

Snigdha<br />Sun Certified Programmer for the Java™ 2 Platform
I agree. Here's the link: http://aspose.com/file-tools
subject: ? about System.out.read()
Similar Threads
Sun Study Guide
redirect within a servlet
Jar all the servlets?
need MAC address of client machine in servlet