created: 7/17/99; revised 7/03/2011, 08/17/2014, 05/15/2015

Fill in the Blanks

Instructions:   This is a fill-in-the-blank exercise. Each question consists of a sentence with one or two words left out. For each question, think of the word or phrase that should fill each blank, then click on the blanks to see if you are correct.

1. Complete the program so that it writes "Good-by" on the computer monitor.

class Bye
  public static void main ( String[] args )  

2. The source file that this program is saved in should be called _______________

(Be sure to use correct upper and lower case characters.)

Assume that the Java source has been saved in the directory C:\someDir on your hard disk.

3. To compile the program, enter this command into the DOS window:


4. The compiler will create a file containing _______________.

5. To run the bytecodes, enter this command into the DOS window:

C:\someDir>_______________  Bye

6. The program that interprets the byte codes on your hardware is called the Java _______________ .

7. Although the underlying hardware may be different, the Java Virtual Machine on your computer is _______________ as that on any other computer, and so can run the same byte codes.

8. An _______________ is a Java bytecode program that runs on a Web browser.

9. To create a Java source file, use a program called a _______________ such as Notepad++.

10. The _______________ command of the Windows command prompt window lists the files in a directory.

End of the Exercise. If you want to do it again, click on "Refresh" in your browser window.

go to home page