creation: 7/17/99


Fill in the Blanks

Instructions:   This is an ungraded fill-in-the-blank exercise. Each question consists of a sentence with one or two words left out. A button represents the missing word(s). For each question, think of the word or phrase that should fill each blank, then click on the buttons to see if you are correct. No grade is calculated for this exercise.


1. A file is a text file in the Java language created by a programmer with a text editor.
    A file is a file of machine language for the Java virtual machine created by a Java compiler.


2. Pick the correct braces, left brace { or right brace } in the following program.
  class Bye  
 
     public static void main ( String[] args )   
    
      System.out.println("Hello");  
    
 

3. The   method is where a program starts running.

4. A   error is a "grammatical error" in using the programming language.

5. In creating a program you need to frequently revise the source file, compile new bytecodes, and run the program to see the result. This process is called the , and cycle.

6. Say that your program was compiled without problems, but when your run it something goes wrong. This is called a .

7. Your assignment is to create a program that writes the following lines on the computer monitor:
Oh many a peer of England brews
Livelier liquor than the Muse,
And malt does more than Milton can
To justify God's ways to man.
Complete the program so that it performs as required.
class Thomas
{  
  public static void main ( String[] args )  
  { 
    System.out.println("  ");  
    System.out.println("  ");  
    System.out.println("  ");  
    System.out.println("  ");  
  }
}

8. An is a Java bytecode program that runs by itself, without the need of a web browser.

9. Here is a poorly indented program. Suggest a better way to intent the program by clicking on buttons where further indenting is needed. (This only works with Microsoft IE).
class Percy
{
public static void main ( String[] args )
{
System.out.println("I arise from dreams of thee");
System.out.println("In the first sweet sleep of night");
System.out.println("When the winds are breathing low,");
System.out.println("And the stars are shining bright");
}
}

10. A    is a note written to a human reader of a program.

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