This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Obviously the format is not int, because there are characters like '*' and ':'. How should we deal with them?
Anyway, if you know how to delimit the input, then you can create a Scanner instance on the input, and set the delimiter. Then all you have to do is perform a while loop in which you check Scanner.hasNextInt() and in the body you read Scanner.nextInt().
No, it isn’t. I can see no way to get an int out of that expression, not even if : means divide. That is a String with various numbers in. It should be easy enough to work out a regular expression for, but beware ^ is a meta-character in regular expressions.