Java program to convert hexadecimal to decimal


Program
import java.util.*; public class HexToDecimal{ public static void main(String args[]){ Scanner s=new Scanner(System.in); String hex=s.next(); int decimal=Integer.parseInt(hex,16); System.out.println(decimal); }}
Input
Output