java prob 4 to 8