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 venkatesan on January 23, 2001 at 10:38 AM

Rajiv,
it is true that the programe will work if the main method had other access modifiers. But it is a convention to have public as the signature for the main method.

I am given to understand that it could be possible that at times repeat at times, if other modifiers are used, the program may not run as main method cannot be called from other classes, packages etc

regards
venkat


> hi guys
> plz tell me can u use private with main ? ?? ?
> if yes why ? ? ? ? ?
> why it is working with private ,without writing any access specifier and also with private .
>
>






Replies:

Sponsored Links



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