Java tutorial
public class Main { public static void main(String[] args) { System.out.println(Integer.decode("010"));// octal numbers System.out.println(Integer.decode("0XA"));// hexadecimal numbers System.out.println(Integer.decode("-0XA"));// minus hexadecimal numbers System.out.println(Integer.decode("-#A"));// minus hexadecimal numbers } }