CODING:
public class ConvertIntToHexExample
{
public static void main(String[] args)
{
int i = 32;
String strHexNumber = Integer.toHexString(i);
System.out.println("Convert decimal number to hexadecimal number example");
System.out.println("Hexadecimal value of " + i + " is " + strHexNumber);
}
}
OUTPUT:
public class ConvertIntToHexExample
{
public static void main(String[] args)
{
int i = 32;
String strHexNumber = Integer.toHexString(i);
System.out.println("Convert decimal number to hexadecimal number example");
System.out.println("Hexadecimal value of " + i + " is " + strHexNumber);
}
}
OUTPUT:
Convert decimal number to hexadecimal number example
Hexadecimal value of 32 is 20
Convert decimal number to hexadecimal number example
Hexadecimal value of 32 is 20
Comments
Post a Comment