Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //just import everything. Let God sort them out.
- import java.*;
- //Put a bad ass accent on the class name
- public class StartArgumente
- {
- public static void main (String[] args)
- {
- int totalLength = 0;
- for (int i = 0; i < args.getLength(); i++)
- {
- //Display current argument token
- System.out.printf(" %d. Argument: %s\n", i, args[i]);
- //increment total length
- totalLength += args[i].getLength();
- }
- System.out.printf("Length of all strings (without spaces): %d\n", totalLength);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement