StringTokenizer is pretty straightforward. The idea is that you can separate a String by whitespace, or any other delimiter that you choose, for example a blank space, or a comma (blank space is default delimiter). Once you create a StringTokenizer object with a String, like for example:
StringTokenizer foo = new StringTokenizer (s, ",");
You can call foo.nextToken() to get the next chunk of String (delimited by a comma).
String s = "what the heck"
StringTokenizer t = new StringTokenizer(s);
will give the expected output:
You need to make sure thast you know when there's no tokens left, since an exception will be thrown if you try to get the next token and it's not there.
There are several algorithms you could use to solve the mathematical expression. I'd use a stack, but that's just me. At least you now know how to get each 'token' of the input. Read up on infix expressions, and how to solve them. It's pretty simple, once you think about it.