Solved BinaryGap in java