Hi all,

In week 3's "Command-line Arguments" presentation the "args" array is
discussed and the code below is used in an example.

Week 3's "Java Arrays" lesson discussed the process of declaring an
array and then instantiating an array.  In this command line arguments
lesson there is no mention of instantiation of the "args" array.
What is the explanation for not having to instantiate this "args"
array?
Is this special instance of an array not need to be instantiated or is
Java just "handling" this in the background?

Thanks


*****************************
*****************************
*****************************
To print the array of arguments, we write:
public class CommandLineSample
  {
      public static void main( String[] args ){

          for(int i=0; i<args.length; i++){
             System.out.println( args[i] );
          }
      }
}
*****************************
*****************************
*****************************


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to