Let us understand the signature and various key words in the main - TopicsExpress



          

Let us understand the signature and various key words in the main method public static void main(String...args) public: as JVM is to find and invoke this method, to make it visible to JVM public is needed. static: if not static to call this method JVM needs to create object of class, if there any overloaded methods thn jvm may confuse in invoking one among them and pass the values, so main must be static . void: as it terminates the process after main it doesnt excpect any value from main(),so its return type is void main: is name JVM looks for internally args: to make it possible to read command line arguments while starting.
Posted on: Sat, 26 Oct 2013 16:10:11 +0000

Trending Topics



Recently Viewed Topics




© 2015