Fill in the Blanks

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


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( System.in );  
 
     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