Common Pitfalls
suggest changePitfall - Using == to compare primitive wrapper objects such as Integer
Pitfall - Using == to compare strings
Pitfall forgetting to free resources
Pitfall - Testing a file before attempting to open it
Pitfall - Thinking of variables as objects
Pitfall - Catching Throwable Exception Error or RuntimeException
Pitfall Not understanding that String is an immutable class
Pitfall - Missing a break in a switch case
Pitfall - Ignoring or squashing exceptions
Pitfall combining assignment and side-effects
Pitfall - String concatenation in a loop does not scale
Pitfall - Throwing Throwable, Exception, Error or RuntimeException
Pitfall concurrent modification exceptions
Pitfall - Ignoring method visibility
Pitfall - Runtime.exec, Process and ProcessBuilder don't understand shell syntax
Pitfall - Using new to create primitive wrapper instances is inefficient
Pitfall - Misplaced semicolons and missing braces
Pitfall incorrect use of wait notify
Pitfall - The overheads of creating log messages