You don't have to split them. Just separate the numbers by spaces on the command line. For example:
Will run SumUp.main with args having 7 elements, one element for each number given on the command line. You'd just need to parse each one to turn it into an int, but you're already doing that. Basically you can eliminate line 3 in your main method and use the args array directly in your for-loop.
BTW, please format / indent your code properly. Improperly indented code is difficult to read and it will confuse you and others. Here's your code properly formatted/indented:
Notice the use of spaces and blank lines to separate parts of your program so that it's easier to distinguish them from each other.
There are a number of Java Style Guides readily available on the Internet, pick a style and follow it consistently.>
Now Java8 is here, the challange is how to do that without using the keywords for and while.
You can create a Stream which iterates an array with a method of the Arrays class; since args is a String, the Stream will be of type String. You can convert that to an IntStream with the mapToInt method using Integer.parseInt and then the IntStream interface has a sum() method:-Note you usually format Stream code so the dots are all aligned vertically. If you pass "five" rather than "5" as an element, you will suffer a number format exception. You have to run the code like this:-
java ArrayAdder 1 2 3 10 11 7 15
Power corrupts. Absolute power xxxxxxxxxxxxxxxx is kinda neat.
ScroogeXHTML - small and flexible RTF to HTML converter library