I am working on the Add em up project in the Blue Pelican Book. I would apreciate some help on figuring out how to get it to do subtraction to get the sum of 1249. Here is my code so far:
`import java.io.*;`
`import java.util.*;`
`public class AddEmUp
`{
`public static void main(String args[])
`{
` String s = "8 + 33 + 1345 - 137";
` Scanner sc1=new Scanner(s);
` sc1.useDelimiter(" +");
` String plusMinus=sc1.next();
`int sum=Integer.parseInt(plusMinus);
`while (sc1.hasNext())
` {
` String sign = sc1.next();
` if ( sign.contains("+"))
` {
` sum += Integer.parseInt(sc1.next());
` }
`}
` System.out.println("Sum is: "+sum);
` }
`}