im trying to understand what's the type of user input whether it is a number or character or string. how can i do the task wanted in comment?
public static void main(String[] args) {
Calculator calculator=null;
Scanner num = new Scanner(System.in);
System.out.println("press C to clear. press E to terminate. ");
while (true) {
String input = num.nextLine();
UserInputHandler.handleuserinput(input, calculator);
// if the input is a number do some thing.
//if the input is a character do some thing else.
}
}