DEV Community

Cover image for 1.Main Method in java
Souravsing Pardeshi
Souravsing Pardeshi

Posted on

2 2

1.Main Method in java

public class main{
    public static void main(String[] args)
    {
        //code
    }
}
Enter fullscreen mode Exit fullscreen mode
  • 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.

Top comments (2)

Collapse
 
angela_learns profile image
Angela Gupta

Good work!

Collapse
 
souravsingpardeshi profile image
Souravsing Pardeshi

thanks 😊

ACI image

ACI.dev: The Only MCP Server Your AI Agents Need

ACI.dev’s open-source tool-use platform and Unified MCP Server turns 600+ functions into two simple MCP tools on one server—search and execute. Comes with multi-tenant auth and natural-language permission scopes. 100% open-source under Apache 2.0.

Star our GitHub!

👋 Kindness is contagious

Dive into this insightful write-up, celebrated within the collaborative DEV Community. Developers at any stage are invited to contribute and elevate our shared skills.

A simple "thank you" can boost someone’s spirits—leave your kudos in the comments!

On DEV, exchanging ideas fuels progress and deepens our connections. If this post helped you, a brief note of thanks goes a long way.

Okay