File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes command line arguments 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 "command line arguments" Watch "command line arguments" New topic

command line arguments

Soumy Kumar
Ranch Hand

Joined: Nov 02, 2004
Posts: 78

I answered 3) none of these options becoz

actually its possible to assign an element of the arg to a string array
and not string ..

am i right ???
[ March 24, 2005: Message edited by: Soumy Sam ]

SCJP 1.4<br />" Something is difficult doesn't mean you shouldn't try, it only means you should try harder "
Animesh Shrivastava
Ranch Hand

Joined: Jul 19, 2004
Posts: 298
Well according to u the code is like:

Do u think its correct?
and in the options its mentioned that "assign an element of the arg" which means assign the element of the array to either
1) a string(Quite obvious), isnt it?
2) or char array(untrue, its not C)
String str1 = args[0];// right
Soumy Kumar
Ranch Hand

Joined: Nov 02, 2004
Posts: 78
I interpreted the qn wrongly..

I agree. Here's the link:
subject: command line arguments
It's not a secret anymore!