so say if i had a string like “3+3-1*2/3=”
how would i go through the string looking at each character and if its a number turn it to a double then if not turn it to a char??
so say if i had a string like 3+3-1*2/3= how would i go through
Share
You can traverse through the String using a loop. For example:
You can check if it is a decimal character by using Character.isDigit(char).
You can convert a string to an integer using parseInt().