|
-
convert int to char
hello everybody!
i want to alter letters like this:
char letter;
int k;
...
letter + k
for example: a+1=b, b+1=c; x+2=z;...
i did it like that:
{
...
String b;
char a,y;
int k = 1;
...
b = readWord(); // input is the letter 'A'
a = b.charAt(0);
y = a + k;
print(y);
...
}
output: 66 ('B' in ASCII) but i want the letter 'B' to be put out. how can i convert the "int" into a "char" again?
later i want to 'crypt' a whole string.
thx and nice greez
ps.: sorry for the sloppy english!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks