The main method header is written as public static void main(String[] args). A main method is something that is required in Java. You must have at least one class with a method named main. In Java, main is a static method, which means that it is part of its class but not parts of objects.