Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
I have
then i do
I want to convert the | |||
Instead of this:
You should use the
| |||
Very simple. Just cast your
In your case, you need to get the specific Character from the String first and then cast it. Though cast is not required explicitly, but its improves readability.
| ||||
Just cast the char to an int.
The value of | |||
It's simple, get the character you want, and convert it to int.
| ||||
Convert the char to int.
Also :
| |||
If you wanted to convert the entire string into concatenated ASCII values then you can use this -
wherein you will get 979899 as output. Credit to this. I just copied it here so that it would be convenient for others. | |||
just a different approach
| |||
lang-java
.
stackoverflow.comm
No comments:
Post a Comment