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:

it does not get instantiated

Posted by saddy on January 30, 2001 at 12:53 PM

it does not get instantiated, the main method is a static metod and does not need an instance to get invoked, in can be invoked by the class name itself.
as about how it works even with private modifier than it is an accepted bug in Java u can check it from sun's site
http://developer.java.sun.com/developer/bugParade/bugs/4252539.html
hope this should clear ur doubt
saddy

> When we write a Java Application Program , we don't instantiate a public class. How is that class then instantiated ? Even with changing the main to private , the program compiles and runs successfully. Why does this happen ? Pl. send me the explanation.






Replies:

Sponsored Links



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