File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes main method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "main method" Watch "main method" New topic
Author

main method

saravanan ragunathan
Ranch Hand

Joined: Aug 02, 2010
Posts: 84

i heard that when i call the main method(java Ex one two)with commandline arguments
jvm will allocate the memory for this arguments and assign the reference to the variable arg..then
what will be the reference when i call main without command line arguments



"I Love Java Ranch"
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18101
    
  39

saravanan ragunathan wrote:then what will be the reference when i call main without command line arguments



An empty array?


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

(And you could answer questions like this by just trying it.)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: main method
 
Similar Threads
ID:14 SCJP Question of th day !!!
Reading a String
static main method
call by value or call by reference
passing arguments from command line