Fill in the Blanks

creation: 08/01/99; revised 06/01/00, 05/12/03, 01/14/06, 06/14/15, 07/15/17

Fill in the Blanks Chapter 13

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.   Both data type long and data type _________ use 64 bits.

2.   Although they have the same number of bits, these data types represent numbers using completely different ____ _________ .

3.   It is usually best to use what floating point type? _________

4.   Input from the keyboard is always _________ data which is read in by the Scanner and then _________ to a numeric type.

5.   The reserved word _________ is used to say that value in a variable will not change.

6.   Most mathematical functions, like sine and cosine, are methods in the _________ class.

7.   Most math function expect arguments of what type ? _________

8.   Most trig function expect angles to be expressed in _________

9.   Examine the following program which reads in a number and writes the sine of the number to the monitor. Fill in the blanks.

_________ java.util.Scanner ;  
class Trig
  public static void main (String[] args)
    Scanner scan = _________ Scanner( );  
    _________ angle, sineAngle; 
    System.out.println("Enter the angle:"); 
    angle = scan._________ 
    sineAngle = Math._________( angle ); 
    System.out.println("The sine of " + angle + " is " + sineAngle );  

10.   If the characters "1x23" were entered as data for the above program, it would throw an _________

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

go to home page