I am getting the error when I launch my UI that causes this code to spit the error at me in the title. It works for all of my other operator symbols so I am really not sure
Change: String[] split = nums.split(operator);
To this: String[] split = nums.split("\\" + operator);
edit: This will only work for standard operators, not the x or X. You'll have to change your String[] operators
declaration actually, like the other answer mentioned. Personally though, I'd do some kind of input validation and do a replace() on x
or X
to be *
instead