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

  1. Name the three kinds of errors.
    syntax errors, logic errors, runtime errors
  2. What do you call an error caused by code that does not follow the rules of the Java language.
    syntax error
  3. What do you call an error where the code runs but it gives the wrong result?
    logic error
  4. What do you call an error where a specific value causes a statement to fail?
    runtime error
  5. What does Java create when a runtime error occurs?
    an exception object
  6. What is the Java statement that allows you to deal with a runtime error?
    a try/catch