954,536 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to do a basic system pause

does java have a ' system ("PAUSE") ' like c++....if so what is the syntax to do it.

ty

SyLk
Light Poster
27 posts since Oct 2004
Reputation Points: 10
Solved Threads: 0
 

Hi Everyone,

Please explain in detail, pause a thread or pause while waiting for input from user??

Richard West

freesoft_2000
Practically a Master Poster
623 posts since Jun 2004
Reputation Points: 25
Solved Threads: 10
 

pause after reading user's input so that the user has a chance to read the screen before the program terminates

SyLk
Light Poster
27 posts since Oct 2004
Reputation Points: 10
Solved Threads: 0
 

If you need something like that your architecture is wrong :)

Commandline programs are executed from a shell, so the output remains visible if the user wants it. If not he'll likely have it redirected to a file and why should you force him to look at something he doesn't want to see?

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

Hi everyone,

Here is a link with some code

http://www.rgagnon.com/javadetails/java-0145.html

do not forget to run your method in a separate thread other from the main thread

Here is another link to pause and resume the console printing of huge data

http://forum.java.sun.com/thread.jspa?threadID=501758&messageID=2372877

I hope this helps you

Yours Sincerely

Richard West

freesoft_2000
Practically a Master Poster
623 posts since Jun 2004
Reputation Points: 25
Solved Threads: 10
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You