Discussion in 'Java' started by sakthi.abdullah, Jun 20, 2007.
Why a class containing main method has to made public..?
public indicates that the main method can be called by any object.
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.
Separate names with a comma.