This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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.