args.length

webmasterbeta

New Member
I'm about as new as you can get. I am looking at some Java code that lookslike this, can anyone help me tell me what it is doing. The Java book andweb searches are not producing any results. The code looks like this...1. public static void main (String args[]) {2. if (2 != args.length) {3. System.err.println("Usage; java GenrateReports dataSourceName initYear");4. system.exit(0);5. }My main question is with line #2. I can not find out what args.length is.Is args a class? And any guesses why the person who wrote it would putit not equal to 2?Confused
 
Top