aspose file tools*
The moose likes Beginning Java and the fly likes Convert a Numeric Value into associated Character Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Convert a Numeric Value into associated Character" Watch "Convert a Numeric Value into associated Character" New topic
Author

Convert a Numeric Value into associated Character

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1466
    
    1
I need to take an encripted string of numbers and change it into readible string. This is my code which will return the correct values for each character but I don't know how to get the character associated with each value. Example 48 = 0, 54 = 5, 106 = j

marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by Steve Dyke:
...I don't know how to get the character associated with each value. Example 48 = 0, 54 = 5, 106 = j...

All you need to do is cast the numeric value to type char.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1466
    
    1
Thanks. That works great.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Convert a Numeric Value into associated Character