Solved PlusOne in java