created: 7/17/99; revised 7/03/2011, 05/15/2015, 07/29/2022


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. 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.

  public 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.


bug

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:

She walks in beauty, like the night
   Of cloudless climes and starry skies;
And all that’s best of dark and bright
   Meet in her aspect and her eyes.

Complete the program so that it performs as required.

public class Byron
{  
  public static void main ( String[] args )  
  { 
    System.out.println(""); 
    System.out.println("");
    System.out.println("");
    System.out.println("");
  }
}

8. A    is an explanatory note in a program intended for a human reader but ignored by the compiler.


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

go to home page