IT 114: Introduction to Java
Answers to Class 9 Ungraded Quiz

  1. If a Java file contains the class named Hello, what must it's filename be?
    Hello.java
  2. What Java statement would you write to print "Hello" but not advance to the next line?
    System.out.print("Hello");
  3. Can a for loop contain another for loop?
    yes
  4. What is the name of the class of words that has special meaning in the Java language?
    keywords
  5. What are the characters used to write a single line Java comment?
    //
  6. What are the characters used to write a multiline Java comment?
    /* and */
  7. If you add a variable of type int to one of type double what type will the result be?
    double
  8. What would the result of dividing 7 by 2 be in Java?
    3