Age Distribution Solution(My java is ugly)