Reputation: 466
I'm trying to get the Ascii value of character but I'm a bit clueless
So far I've found
Character.getNumericValue
But when I read the documentation it says
Returns the int value that the specified Unicode character
In php I used to use ord(string String)
So will Character.getNumericValue do for me?
Upvotes: 4
Views: 147
Reputation: 6406
All you have to do is cast (int) c
, where c
is your char
(i.e. character).
Upvotes: 8