6. 

Which collection class allows you to associate its elements with key values, and allows you to retrieve objects in FIFO (first-in, first-out) sequence?

A. java.util.ArrayList
B. java.util.LinkedHashMap
C. java.util.HashMap
D. java.util.TreeMap

7. 

Which is valid declaration of a float?

A. float f = 1F;
B. float f = 1.0;
C. float f = "1";
D. float f = 1.0d;

8. 

/* Missing Statement ? */
public class foo 
{
    public static void main(String[]args)throws Exception 
    {
        java.io.PrintWriter out = new java.io.PrintWriter(); 
        new java.io.OutputStreamWriter(System.out,true); 
        out.println("Hello"); 
    } 
}
What line of code should replace the missing statement to make this program compile?

A. No statement required.
B. import java.io.*;
C. include java.io.*;
D. import java.io.PrintWriter;

9. 

What is the numerical range of char?

A. 0 to 32767
B. 0 to 65535
C. -256 to 255
D. -32768 to 32767

10. 

Which of the following are Java reserved words?

  1. run
  2. import
  3. default
  4. implement

A. 1 and 2
B. 2 and 3
C. 3 and 4
D. 2 and 4