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