File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply 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: 1254
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: 1254
Thanks. That works great.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Convert a Numeric Value into associated Character
 
Similar Threads
hashcode and equals()
Incompatible types
equals() method
Test User Input Sting to Object
hashcode question