<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">class CommandLineArgs {
   
   public static void main(String[] args) {
      
      System.out.println(args.length);
      
      // reading the command line args
      
      // old-style
      for (int i = 0; i &lt; args.length; i++) {
         System.out.println(args[i]);
      }
      
      // new style
      for (String s : args) {
         System.out.println(s);
      }
   }
}</pre></body></html>