A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
convert character to ascii and back
Joined: Nov 17, 2003
Mar 29, 2005 13:07:00
I've been trying to find a way to convert a charcter like a letter to its ascii equivalent and vice versa. Is there a method to accomplish this?
author and iconoclast
Joined: Jul 08, 2003
Mar 29, 2005 13:16:00
char aChar = 'a'; int anInt = aChar; // anInt is 97 char anotherChar = (char) anInt; // anotherChar is 'a';
"char" is an integral type, so casting is sufficient. To convert from a char to an int, you don't even need that!
[Jess in Action]
Don't get me started about those stupid
subject: convert character to ascii and back
how do u convert ascii to binary?
Ascii to hex converter
Ascii to Hex
What is %3F... signs in the URL ?? urgent..
any hints for creating &/or using existing UNICODE convertor/processor?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013