.equals() when comparing strings, not ‘==’, as the latter compares references not contents. So “Hill” entered by the user will be a different
String instance to “Hill” loaded from a file.
…obviousnesses like trap nulls, empty collections, …
See the Java Hall of Shame: http://www.cs.arizona.edu/sumatra/hallofshame/
Beware multithreading. This is a complete topic in itself, but here’s an interesting note on double check locking, and why you can’t count on it working.
Similarly a general rant at http://www.jwz.org/doc/java.html, but includes some useful things to bear in mind if you’re getting deep in.