This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I am creating a program that will calculate a math equation similar to (5+5) + 6*3 + 18. It works when I put spaces between the integers and operators, however if there is no space it gives me a stack error. I know its because I am using s.nextInt(); for numbers and s.next() for the operators and if there is no space s.next() will pull everything till you get to a space. Any suggestions on how to fix this. Line 57 is my error because of an empty stack. The input is read between 17-24.