This question has already been answered:
- Strange behavior of the split 2 response method
It is necessary to separate the numbers with a space to determine what type of number is being entered and what operation (+ - * /).
But for some reason the split point does not think so .... How to fix? And how to determine str.charAt (i) == what type?
str="3.5 + 2"; str.split(" "); for(int i=0; i < str.length(); i++) { System.out.println(str.charAt(i)); }