zathael
asked on
char and int conversions...
I need to do the following:
I have an integer with a value, and for this example we'll use 65.
Now, I want to convert that value to the character 65 or "A".
In C, I can use:
int temp1=65;
char temp2;
temp2=temp1;
and boom, I have temp2 == 'A'
However, in Java I can't do that. I can do:
int temp1;
char temp2='A';
temp1=temp2;
and instantly temp1=65, but I can't go the other way. Is there a way to do this?
Thank you.
I have an integer with a value, and for this example we'll use 65.
Now, I want to convert that value to the character 65 or "A".
In C, I can use:
int temp1=65;
char temp2;
temp2=temp1;
and boom, I have temp2 == 'A'
However, in Java I can't do that. I can do:
int temp1;
char temp2='A';
temp1=temp2;
and instantly temp1=65, but I can't go the other way. Is there a way to do this?
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER