The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
February 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Ascii Convertion

Posted by Matt Gerrans on January 30, 2002 at 1:31 PM

> > I am trying to convert chars to the ascii number, perform some
> > math, and convert the result back to char. However, the use
> > of Character.getNumericValue('A') returns 10, not 65 as expected.

> > How can I do this?
> > Furthermore what is the reverse if the above

Just cast the char to int, do you thing and cast it back to char.






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us