Java homeworks and exam solutions