up previous next contents
Next: The throws clause Up: Exceptions Previous: Creating exception types   Contents

throw

  • Exceptions are thrown using the throw statement.
  • Exceptions are objects, so they must be created (with new) before being thrown.


up previous next contents
Next: The throws clause Up: Exceptions Previous: Creating exception types   Contents