public class Main { public static void main(String[] argv) throws Exception { int i = 0xf1; System.out.println("i is hex " + Integer.toHexString(i)); } }