I have a string
String numAsString = "8 * 9";
And I want to convert this into an integer, so when I print the integer
int numAsInt = (the code I am asking for);
System.out.println(numAsInt);
The output would be
72
I have tried parseInt and valueOf, but both give an exception cause of the asterisk.
If you don't know, the asterisk means multiplication.
Is there a way to do this?