My java program won't convert unicode to int, but will convert ascii to int. The first line works and converts ascii 53 to int 5. However, the second line with the unicode value stops the program.
first = Integer.parseInt(String.valueOf(operatorStack.pop())); //this pop is ascii 53
second = Integer.parseInt(String.valueOf(operatorStack.pop())); //this pop is unicode \u0004
Here are the errors it is throwing:
Exception in thread "main" java.lang.NumberFormatException: For input string: ""
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
at java.base/java.lang.Integer.parseInt(Integer.java:646)
at java.base/java.lang.Integer.parseInt(Integer.java:778)