Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • I also tried something like this. Even though we have multiple main method but the main method with argument (String args[]) is executed first. Is there a way to run other main method first? Commented Dec 4, 2017 at 2:46
  • 1
    @RishabhAgarwal Your Java runtime looks for main method with (String args[]) when your class with main method is loaded. I am not aware of any mechanism to override it. Commented Dec 4, 2017 at 6:41