Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
February 21, 2022 07:05 am GMT

1.Main Method in java

public class main{    public static void main(String[] args)    {        //code    }}
  • entry level is main method.

  • this method is public so it can be easily found by jvm.

  • void because not expected to return anything.

  • static so no need to create object of class for execution.

  • String[] args are array of string as arguments for code.


Original Link: https://dev.to/souravsingpardeshi/1main-method-in-java-38bc

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To