Some little Java exercises