Output the ascii code of a character

I am trying to input a char and output the ascii code. I assume there is a built in method in java to do this but i don't know what it is.Can anyone help me?
[172 byte] By [helenCol12a] at [2007-10-2 5:38:46]
# 1

> I am trying to input a char and output the ascii code. I assume there is

> a built in method in java to do this but i don't know what it is.

Have a look at this:char c= 'A';

System.out.println("char is: "+c);

System.out.println("code is: "+((int)c));

kind regards,

Jos

JosAHa at 2007-7-16 1:49:09 > top of Java-index,Java Essentials,New To Java...
# 2
Great! Thanks a lot
helenCol12a at 2007-7-16 1:49:09 > top of Java-index,Java Essentials,New To Java...