Error in java code

I am unable to understand why the above code is giving error on eclipse ide. But on using the same code on CodeChef online ide, it is getting compile without any error.