Hello, and welcome to JavaRanch,
To learn more about command line input, you can take a look at the
I/O from the Command Line trail (i.e. topic) from
The Java Tutorial. It explains basic command line input and output (I/O).
In terms of a program ending, you are correct. Once all the processing has completed, it ends. For a program to continue or keep running, a part of the program would need to be in some sort of state of waiting for something to happen, such as user input via the command line or a GUI, receiving a request from another system (like a database or web server does), etc. To do this, an application needs to be multi-threaded. You can learn about that in the Java Tutorial as well in the
Concurrency lesson.
In addition to the Java Tutorial, I can highly recommend the book
Head First Java (more info us available
here) to assist you in the learning process. If you search JavaRanch for Head First Java, you will find many people singing its praises. It's very different from most technology books. And you definitely come away with a good understanding of Java basics.
Best Regards...
[ July 21, 2008: Message edited by: Mark Vedder ]