A Java method is a collection of statements that are grouped together to perform an operation . When you call the System. out. println() method, for example, the system actually executes several statements in order to display a message on the console.