Returns the ASCII value as an integer in Java

jakarta-ee, java

Solution

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

Problem

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?

Original source