title: Why only String[] args in java instead of Object[] args?
body: <p>In java, as per the <a href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-12.html#jls-12.1.4" rel="nofollow">Java Language Specification 12.1.4</a> the main method should be declared as follows:</p>
  
  <pre><code>public static void main(String[] args){
       //code of program
  }
  </code></pre>
  
  <p>With the use of <code>String[] args</code> we can get command-line arguments. Sometime those command-line arguments needs to be converted to appropriate type. suppose if you have supplied any number <code>123</code> as an argument and you want to convert it to <code>int</code> then we can use one of the following conversion methods:</p>
  
  <pre><code>int n1=Integer.valueOf(args[0]);
  //or
  int n2=Integer.parseInt(args[0]);
  </code></pre>
  
  <p>But, if java could have provided use of <code>Objects[] args</code> instead <code>String[] args</code> then we can easily convert from one type to another, for this example conversion would take place as follows:</p>
  
  <pre><code>public static void main(Object[] args){
       int n1=(Integer)args[0];
  }
  </code></pre>
  
  <p>I'm not getting this why java have used <code>String[] args</code> and not <code>Object[] args</code>?</p>