Basic Java training exercises