Compiling an Application with Multiple Classes

You must compile the classes in Fig. B.1 and Fig. B.2 before you can execute the application. First, change to the directory that contains the application’s source-code files. Next, type the command

javac GradeBook.java GradeBookTest.java

to compile both classes at once. If the directory containing the application includes only this application’s files, you can compile all the classes in the directory with the command

javac *.java

The asterisk (*) in *.java indicates that all files in the current directory that end with the file-name extension “.java” should be compiled.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset