Java parser working in double