As part of a calulator program I am writing, I am required to have the user input all the parameters in one string and I need to extract the corresponding values from it.
For example the user enters "3 5 *" he'll get "15" back.
So the program I need to write will take '3' and assign that to double input1, '5' to double input2, and '*' to char operator. How do I get java to assign parts of a string to different members.
I was thinking of maybe splitting the user's string into multiple strings and parsing the values out but I don't know how effective that would be. Thanks in advance.