Memanggil metode yang ditentukan pengguna di java

class userDefinedMethod
{
static void showMessage() 
{
System.out.println("Static method.");
}
void displayMessage() 
{
System.out.println("Non-static method.");
}
public static void main(String[] args) 
{
showMessage(); 
userDefinedMethod method=new userDefinedMethod();
method.displayMessage();
}
}
Outrageous Ostrich