Series of Java exercises