Sunday, 25 August 2013

why main should be present in java class?

why main should be present in java class?

why should we declare main method? I know that main method is the starting
point of the class. But why should only we declare as public static void
main(String args[])?
Why can't we declare as public static void test(String args[])? Is that
main key word? How will JVM knows that it will be the starting point?

No comments:

Post a Comment