The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
January 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

main method

Posted by karthik on January 22, 2001 at 10:32 PM

I also found it strange sometime back when i accidently tested the code.yep, it works. I guess, the access specifiers are for us ( i mean programmers) it does'nt matter for the JVM as long as it finds a main(String[] args) declaration.I mean if the main is private i can't call that main from another java program.But yeah Java Lang Spec says clearly that any stand alone program , to run, s'd have a PSVM signature for the main method.
Can someone else explain this?






Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us