Convert hexadecimal number to decimal number in Java
Description
The following code shows how to convert hexadecimal number to decimal number.
Example
//w w w . j av a 2 s.co m
public class Main {
public static void main(String[] args) {
System.out.println(Integer.parseInt("20", 16));
}
}
The code above generates the following result.
Home »
Java Tutorial »
Java Data Type »
Java Tutorial »
Java Data Type »