You can print the hexadecimal value of an int in Java with the following code:

 int i = 0xf1;
System.out.println("i is hex " + Integer.toHexString(i) );