Basically the User needs to input a Hexadecimal number which then converts it to decimal and binary numbers. I created two separate classes for the decimal and binary conversion and they work perfectly. What I wanted to do is to limit the input number making "90" the minimum input and "FF" the maximum one.
public static void main(String[] args) {
ForwardorBack Binary = new ForwardorBack();
Speed Decimal = new Speed();
String Hexadecimal = "";
Scanner input = new Scanner(System.in);
System.out.println("Enter Hexadecimal Number");
Hexadecimal = input.nextLine();
while (Hexadecimal.length() > 2 || Hexadecimal.length() < 2) {
System.out.println("Error Enter different number:");
Hexadecimal = input.nextLine();
}
Decimal.wheels(Hexadecimal);
Binary.move(Hexadecimal);
}
camelCase;PascalCaseis reserved for classes.