Apart from the above-mentioned signature of main, you could use public static void main(String args[]) or public static void main(String… args) to call the main function in Java . The main method is called if its formal parameter matches that of an array of Strings.