Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1. //just import everything.  Let God sort them out.
  2. import java.*;
  3.  
  4. //Put a bad ass accent on the class name
  5. public class StartArgumente
  6. {
  7.     public static void main (String[] args)
  8.     {
  9.         int totalLength = 0;
  10.         for (int i = 0; i < args.getLength(); i++)
  11.         {
  12.             //Display current argument token
  13.             System.out.printf(" %d. Argument: %s\n", i, args[i]);
  14.  
  15.             //increment total length
  16.             totalLength += args[i].getLength();
  17.         }
  18.     System.out.printf("Length of all strings (without spaces): %d\n", totalLength);
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement