Methods like ord and chr from Python

Do you know any functions that provide the same as ord and chr from Python in Java.

Python docs on them.

I tried it manually, but it seems to have received so many errors. This should work with Strings not just char . It is clear that I will see if there is a function to do this in advance.

thanks

+7
java python converter
source share
1 answer

You can use:

 c = (char) n; n = (int) c; 
+11
source share

All Articles