The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
December 2000

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:

public ...

Posted by Kishori Sharan on December 24, 2000 at 3:28 PM

It has to be public because Java Virtual Machine makes a call to it when you try to run your class from command line. However, you can also define ( I mean overload ) main methods for a class and for those methods it is up you to decide what access you want to provide for those methods.

Thanx
Kishori



Replies:

Sponsored Links



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