Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

main method in java

It is a keyword which is when associated with a method, makes it a class 
related method. The main() method is static so that JVM can invoke it without
instantiating the class. This also saves the unnecessary wastage of memory which
would have been used by the object declared only for calling the main() method by 
the JVM.
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #main #method #java
ADD COMMENT
Topic
Name
4+4 =