aspose 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
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: 19073
    
  40

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