How can you write the main function in java?

Posted by  Nitin Kushwaha
 248  View(s)
Ratings:
Rate this:

with example...


  1. Re: How can you write the main function in java?

    How can you write the main function in java?

    We can write the main function in various types:-

    •  public static void main(String args[]).
    •  static public void main(String args[]).
    •  static public void main(String a[]).
    •  static public void main(String []a).
    •  static public void main(String……a).
    •  static public void main(String…..XYZ).
    •  final public static void main(String….a).
    •  final synchronized public static void main(String….a).
    •  final synchronized strict floating-point public static void main(String….a)

Answer