10. The red square ---terminating Java programs
Take a look at the Eclipse window below. The red square under the editing pane tells you that a program is running (i.e. is being executed). Notice also that Console pane is showing. It says that Java Application E is running, and four lines have been printed ---the first and second contain "2" and "3".
To terminate execution of the program, click the red square. The red square will become gray, and the "x xx" following it will be enabled. The Console is also still there. Click "x" or "xx"; the Console will be deleted and the "x xx" will be disabled.
Watch out! Several Java programs may be running!
You can have one, two, three, or any number of Java programs running at the same time! Usually, you don't want this, and you may not be aware of it. Each one may eating up processor time, and your computer may become sluggish.
Suppose two Java programs are running. Click the red square to terminate one of them and then click the "x" to delete its Console. The square will become red again and a Console will appear, for the Java program that is still running. You can now delete this one.