Pieces of Java Code