I've been trying to assign a string (consonantString) to a char (consonantChar). I found and tried using the following code:
String consonantString = (new Character(consonantChar)).toString();
Since the code assigns a char to a string, I tried changing it so it assigned a string to a char and I ended up with:
Char consonantChar = (new String(consonantString)).toChar();
However, the to.Char() caused an error and the program said I should use toCharArray(); instead. When I tried that, it didn't work either.
Does anyone know how I can fix that?
Thanks in advance.