String to char (keyboard entry problem)
Posted on 2004-05-02
Taking three pieces of information from the keyboard
first is of String : No Problem here
secons is of Int : No problem here.
Third is of char: The problem
Using the BufferedReader.readline or BufferedReader.read() methods
I keep getting a 'Cannot convert String to Char error' on compilation.
What method should i use to read this character ?
I see lots of examples of charAt().. But this is not the case. I am assuming that the user will enter either M or F
Exceptions can be dealt with later.
So how is the first character 'char' read in from the keyboard.