java-pitfalls icon indicating copy to clipboard operation
java-pitfalls copied to clipboard

A collection of Java code examples containing typical (sometimes subtle) programming errors

Java Pitfalls Build Status

A collection of Java code examples containing typical (sometimes subtle) programming errors.

Pitfall Atari 2600 1982 by reusdesigns

Instructions

  • Each class in package de.kimminich.pitfalls of folder src contains at least one programming error
  • For the best learning experience view the code directly on github.com or use a text editor as some IDEs (e.g. IntelliJ IDEA) will complain about some of the bugs out-of-the-box
  • Only check a corresponding Hint class in folder src-hints if you cannot find the bug(s) otherwise
  • If the test doesn't help (or there is none for that class) you might want to run FindBugs on that particular file
  • A possible fix for each pitfall can be found in the corresponding Fixed classes in folder src-fixed

Enjoy!


Image: http://reusdesigns.deviantart.com/art/Pitfall-Atari-2600-1982-106033303