Hour glass doubt

it is showing wrong answer but it is working fine in eclipse