Convert decimal integer to hexadecimal number example
import java.io.*;
import java.lang.*;
public class DecimalToHexadecimal{
public static void main(String[] args) throws IOException{
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter the decimal value:");
String hex = bf.readLine();
int i = Integer.parseInt(hex);
String hex1 = Integer.toHexString(i);
System.out.println("Hexa decimal: " + hex1);
}
}
run:
Enter the decimal value:
16
Hexa decimal: 10
--------------------------------------------------------
hex - Decimal to Hexadecimal Converter in Java
Java Convert integer to hex integer
Converting to/from hexadecimal in Java
Can someone give me a java code how to convert decimal to
How to convert decimal to hex using a do-while, while
Hexadecimal To Decimal Java Conversion Doesn't
Java program to convert hexadecimal number to
Java program to convert binary,octal,decimal to
Converting an decimal int to a hex without using Integer.toHexString
Convert decimal integer to hexadecimal number example
help on java program to convert decimal number to hexadecimal
How to convert Decimals to Hexadecimals in a Java program
How to convert decimal to binary, octal and hex String in Java Program
How to convert decimal to binary, octal and hex String in Java Program
Searches related to java Convert Decimal to Hexadecimal
java convert hex string to decimal
java convert int to hexadecimal
java int to hexadecimal example
convert to binary in java
hexadecimal to integer
integer to hexadecimal converter
ffff in decimal
how to convert decimal to hexadecimal