The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
May 2000



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.


private static void main(String str[])

Posted by Ajmal on May 31, 2000 at 4:04 PM

I can compile and run the following code. How? Note that instead
PUBLIC static void main I've used PRIVATE static void main.
In books it is givn that it main be public inorder for the
JVM to access it. Even if i make it PROTECTED it works

public class Test{
private static void main(String s[])

  • reply Suresh Kumar.R June 20, 2000 at 8:38 AM (1)

Sponsored Links

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