Online Java Compiler By
JavaTpoint.com
public class CharToIntExample2{ public static void main(String args[]){ char c='1'; int a=Character.getNumericValue(c); System.out.println(a); }}
Output