Hello, World! from custom method - Java Language Basics

Java examples for Language Basics:Hello World

Description

Hello, World! from custom method

Demo Code

public class HelloWorldMethod
{
    public static void main(String[] args)
    {//from   ww  w  .ja  va2  s  .c  o m
        sayHello();
    }

    public static void sayHello()
    {
        System.out.println("Hello, World!");
    }

}

Related Tutorials