Binary to Decimal Converter
Hi everyone. I need help with my Java program. I was tasked to create a program that converts an inputed 16-bit, 2's complement binary or hexadecimal number into decimal number. Included in the input is the 0b and 0x to indicate whether its binary or hexadecimal. The main rule for the program is that I only have to use the String and Scanner classes. Also, I was restricted to use only the hasNext() and nextLine methods for the Scanner class. Do you have any tips on how to make the program?