Java exercises (NetBeans)