If your string contains exactly one character the simplest way to convert it to a character is probably to call the charAt
method:
char c = s.charAt(0);
If your string contains exactly one character the simplest way to convert it to a character is probably to call the charAt
method:
char c = s.charAt(0);