Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   why a class contains main method has to made public (http://www.go4expert.com/forums/class-contains-main-method-public-t4781/)

sakthi.abdullah 20Jun2007 21:20

why a class contains main method has to made public
 
Hi
Why a class containing main method has to made public..?

pradeep 22Jun2007 07:28

Re: why a class contains main method has to made public
 
public indicates that the main method can be called by any object.

shabbir 22Jun2007 09:14

Re: why a class contains main method has to made public
 
I am not a Java expert that reason could be for having the main public but for having the class public the reason could be it can be invoked from any package.


All times are GMT +5.5. The time now is 09:16.