char.Parse (does this exist)

Hey experts... I want to prompt the user to enter a symbol then I want to read that into a char variable. How can I do this? It's easy with integers or strings but my textbook doesn't mention anything about chars.... Thanks
[239 byte] By [mensreaa] at [2007-10-2 22:06:09]
# 1
I used the following (inputSymbol is a string and symbol is a char)inputSymbol = in.readLine();symbol = inputSymbol.charAt(0);I hope that's what my teacher will want....
mensreaa at 2007-7-14 1:22:49 > top of Java-index,Java Essentials,New To Java...
# 2

that will work...

um, if you're using easyreader(as the name suggests, it makes reading input easy) then you can do

char symbol=in.charInputLine();

anyways heres how to typecast

char woot;

int blah=200;

woot=(char)blah;

int blah;

double thing=100;

blah=(int)thing/13;

Message was edited by:

PlasmaLink

Message was edited by:

PlasmaLink

PlasmaLinka at 2007-7-14 1:22:49 > top of Java-index,Java Essentials,New To Java...