It's giving correct output while running in eclipse