Methods like ord and chr from Python

converters, java, python

Solution

You can cast:

c = (char) n;

n = (int) c;

Problem

Do you know any functions that would preform the same as `ord` and `chr` from Python in Java. Python docs on them. - http://docs.python.org/2/library/functions.html#ord - http://docs.python.org/2/library/functions.html#chr I've experienced manually but seem to get so many errors. This would need to work with `Strings` not just `char`. Figured I would see if there was a function to do it pre-built. Thanks

Original source