There are two loop structures that you can use in Java, the while and the for loop.
Do you know how to use these? If not, you should probably consult one of the 1.2 bazillion references that are available on the web, some of which are mentioned at the top of this forum (you must have seen them on the way in...) and get back to us.
The first thing you want to do is to use one of these structures to make this run forever. Then you can can work on getting it to stop.
jon.kiparsky
Posting Virtuoso
1,849 posts since Jun 2010
Reputation Points: 383
Solved Threads: 187