HW8
Write a Java program to convert a hexadecimal (base 16) numberinto decimal (base 10), to convert a decimal number into binary andthen convert the binary into hexadecimal. Check that the originalhexadecimal number is the same as the final output.
Write three separate methods, each receiving a string parameterand returning a string.
public static String Hex2Dec(String input)
Use a loop to sum the powers of 16 multiplied by the appropriatevale 0 to F in each position. You can convert an integer to aString as follows:
int number = -782;
String numberAsString = Integer.toString(number);
public static String Dec2Bin(String input)
Use the repetitive division process to get a new
PayPal Gateway not configured
PayPal Gateway not configured