title: Using int Instead Of String: public static void main (int[] args)
body: <p>I was under the impression that the main method had to have the form "public static void main (String[] args){}", that you couldn't pass int[] arguments.</p>
  
  <p>However, in windows commandline, when running the following .class file, it accepted both int and string as arguments.</p>
  
  <p>For example, using this command will give the output "stringers": "java IntArgsTest stringers"</p>
  
  <p>My question is, why? Why would this code accept a string as an argument without an error?</p>
  
  <p>Here is my code.</p>
  
  <pre><code>public class IntArgsTest 
  {
      public static void main (int[] args)
      {
  
          IntArgsTest iat = new IntArgsTest(args);
  
      }
  
      public IntArgsTest(int[] n){ System.out.println(n[0]);};
  
  }
  </code></pre>