How do you find the smallest and largest character in a string in java