Quiz 3: Java

    True or False?

  1. T or F You should begin testing only after most of the code is written. 
  2. T or F When compiling a Java program, the command to use is compile.
  3. T or F An object that represents an average of integers should have a data type of int.
  4. T or F The bubble sort swaps elements as it goes through the list.  
  5. T or F An if statement is an example of a loop. 
  6. T or F A for loop will always execute the code inside the loop at least one time. 
  7. T or F The expression i++ increments the variable i by adding 1 to its value. 
  8. T or F If your code works, it doesn't matter what it looks like. 

    Fill in the blanks (each question is either completely right or wrong, no partial credit):

  9. In order to run a Java __________________________ you must also have an HTML file.
  10. Convert the binay number 110100101010100111001111 to hex:
  11. What kind of Java program can run over the Internet? _______________________________.
  12. Write the command to compile an application called Test1:
  13. Write the command to compile an Applet called Test1:
  14. Constructors are called with ________________ while instance methods are called with ______________________.
  15.  The return-type of a method that has nothing to return should be ___________________.
  16. Write the command to run an application called Test1: 
  17. If you need a loop that counts, you should use a _______________, and if you have a loop that ends when a particular condition changes, you should use a _____________.
  18. When reading a signature, what specific aspect indicates that it is a constructor?
  19. What command is used to run an Applet?
  20. The 3 types of test cases are:
    1. ________________________________  3. _________________________________
    2. ________________________________