add rightmost_char in java src