Java Reference
In-Depth Information
To Recompile and Run the Application
1. Click Tools on the menu bar and then click Compile Java on the Tools
menu. If TextPad displays any error messages in the coding window,
click Welcome.java in the Selector window. Fix the errors and repeat
Step 1.
The source code is compiled. Clicking the Compile Java command automati-
cally saves the file again.
2. After TextPad successfully compiles the source code, run the program by
clicking Tools on the menu bar and then click Run Java Application on
the Tools menu.
The program runs and the println() methods send data to the monitor
(Figure 2-41). The output is displayed, with all lines indented from the left
side of the command prompt window.
escape characters
indent code from
left side of window
command
prompt
window
output is
displayed
Close button
system
date
FIGURE 2-41
OTHER WAYS
3. Click the Close button in the command prompt window title bar.
1. Press CTRL + 1 , CTRL + 2
2. At command
prompt, type javac
Welcome.java , type
java Welcome
Printing the Source Code
The final step of the development cycle for this application is to document the
program by printing the code. A printed version of the source code is called a
hard copy , or printout . Perform the steps on the next page to print the source
code.
Search WWH ::




Custom Search