aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Zeroth element of the string array passed to the main method contains what ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Zeroth element of the string array passed to the main method contains what ?" Watch "Zeroth element of the string array passed to the main method contains what ?" New topic
Author

Zeroth element of the string array passed to the main method contains what ?

Sathi Krishna
Ranch Hand

Joined: Oct 21, 2007
Posts: 51

What does the zeroth element of the string array passed to the public static void main method contain?

A. The name of the program
B. The number of arguments
C. The first argument if one is present

Please Let Me Know the Answer !!

Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1454
    
    6

C. The first argument if one is present


Swastik
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
Why don't you just try it out ? ;)

The string array contains the arguments passed to the program separated by space.
So array[0] contains the first argument.


JDBCSupport - An easy to use, light-weight JDBC framework -
sujith Acharya
Ranch Hand

Joined: Dec 25, 2006
Posts: 60
The first argument if its present
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14111
    
  16

Sathi, welcome to JavaRanch.

We have a rule here: when you copy a question from a book, mock exam or other source, we require that you quote your sources. So, please tell us where you got this question from.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Zeroth element of the string array passed to the main method contains what ?