What is the signature of main method in a java class?

This is a simple question but nowadays programmers prefer auto generated code by IDEs rather than using any text editors and they have difficult remaining this simple signature. The signature of main method in a java class is

public static void

example:- public static void main(String[] args)

where public defines the access level, static is the modifier, void is the the return type and “String[] args” is the argument that is passed (arrays of String object)

In Category: Java

Ravi Shankar

A Software developer and blogger who is always looking to provide technical help to the wider community.

Show 0 Comments
No comments yet. Be the first.

Leave a Comment

Get your free copies of the following tech guides by joining the Digital Answers mailing list.