public class helloworld{ public static void main(String args[]){ System.out.println("Hello World"); } }
In this basic class file, println is a method. The main method is the starting point for any java program.
Technically, in this simple program, the method is the following code
public static void main(String args[]){ System.out.println("Hello World"); }