Skip to content
Michael Dunn edited this page Sep 26, 2013 · 4 revisions

Ways to earn bonus points

Contributing to this wiki

Bonus points will be given if you make significant improvements to this ICS 211 wiki.
Significant improvements include

  • Fixing errors in posted source code
  • Adding example source code
  • Adding explanations or clarifications to a specific problem
  • By providing interesting links to blog posts, youtube videos, or papers that help to support the current discussion

See my guide to editing wiki pages.

Participating in Github activities

We will be learning how to use github together this semester in lab. There will be opportunities to fix and contribute to open source software used in this lab and hosted in this repository. Not only will you learn to use git and github, but you can also get some experience contributing to open source software. Git and open source look awesome on resumes.

See my guide on using git and github.

Lab Participation

There will also be activities in lab for bonus points. These activities will be announced at the beginning of lab.

Some common exceptions in Java

(courtesy of Java Programming: From Problem Analysis to Program Design by D.S. Malik) The following exceptions are listed by hierarchy.

  • RuntimeException
    • ArithmeticException
    • ArrayStoreException
    • ClassCastException
    • IllegalArgumentException
      • NumberFormatException
    • IllegalMonitorStateException
    • IndexOutOfBoundsException
      • ArrayIndexOutOfBoundsException
      • StringIndexOutOfBoundsException
    • NegativeArraySizeException
    • NullPointerException
    • SecurityException
    • EmptyStackException
    • MissingResourceException
    • NoSuchElementException
      • InputMismatchException

The ones I find most useful that are thrown from Scanner methods (input from the user) are:

  1. ArithmeticException Thrown when dividing by zero.
  2. ArrayIndexOutOfBoundsException Array index < 0 || >= array.length
  3. IndexOutOfBoundsException Array index is out of bounds.
  4. StringIndexOutOfBoundsException String index < 0 || >= length of string.
  5. FileNotFoundException Reference to a file that cannot be found.
  6. IllegalArgumentException Calling a method with illegal arguments.
  7. NullPointerException Reference to an object that hasn't been instantiated.
  8. NumberFormatException Use of an illegal number format.
  9. InputMismatchException Input (token) retrieved does not match pattern for expected type, or token is out of range for the expected type. i.e. a decimal point is entered when an integer is expected.

Clone this wiki locally