The word void
 


//Demo Program for Methods

import java.io.*;
import BreezyGUI.*;

public class DisplayClass
{
public static void main (String[ ] args)
{
System.out.println("Calling all methods!");
asterisks( ); //invoking method (calling the method)
System.out.println("Great job, method!");
asterisks( ); //invoking method again
System.out.println("We're out here!");
}
//Method for astericks
public static void asterisks( ) // Method definition
{
int count;
for(count = 1; count<=20; count++)
System.out.print("*");

System.out.println( );
}
}

Output:

Calling all methods!
********************
Great job, method!
********************
We're outa here!

(c) Shilpa Sayura Foundation 2006-2017