title: A beginner's error (args[0])
body: <p>I started to read a book on java, and there the author showed this program. But I get errors in the line with args[0]. The author writes that this line has to read string. Is it true?</p>
  
  <pre><code>public class Main {
  
  public static void main(String[] args) {
  
      System.out.println(args[0]);
  
      System.out.println("Amazing");
  }
  }
  </code></pre>
  
  <p>The error:</p>
  
  <pre><code>Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
  at Main.main(Main.java:5)
  </code></pre>