Returns an ASCII value as an integer in Java

I'm trying to get the value of an Ascii character, but I'm a little clueless

So far i have found

Character.getNumericValue 

But when I read the documentation, he says

Returns an int value that is the specified Unicode character

In php, I used to use ord (string String)

Does character .getNumericValue mean to me?

+4
source share
1 answer

All you have to do is press (int) c , where c is your char (i.e. character).

+8
source

Source: https://habr.com/ru/post/1416141/


All Articles