### Standard Method

The classic entry point using the `main` method and `System.out.println`.

    public class HelloWorld {
        public static void main(String[] args) {
            System.out.println("Hello World!");
        }
    }

### Functional Method

Using a custom method to separate the output logic from the main entry point.

    public static void print(String msg) {
        System.out.println(msg);
    }

### Interactive Input

Using the `Scanner` class to accept user input and print a customized message.

    Scanner sc = new Scanner(System.in);
    String name = sc.nextLine();
    System.out.println("Hello, " + name);

### Graphical Popup

Using `JOptionPane` to show the greeting in a graphical dialog box window.

    import javax.swing.JOptionPane;
    // ...
    JOptionPane.showMessageDialog(null,
        "Hello World!");

### Stream API

A more advanced functional approach using Java Streams and Lambda expressions.

    List.of("Hello", "World")
        .stream()
        .forEach(System.out::print);

### Multithreading

Printing greetings from multiple threads simultaneously using Lambda expressions.

    new Thread(() ->
        System.out.println("Hello!")).start();

### Java Reflection

Invoking methods dynamically at runtime using the powerful Java Reflection API.

    Method m = obj.getClass()
        .getMethod("sayHello");
    m.invoke(obj);

### File Output

Writing "Hello World" to an external text file using the `FileWriter` class.

    try (FileWriter w = new FileWriter("h.txt")) {
        w.write("Hello World!");
    }

### Download Project

Get the full source code including advanced features in a single package.

Download .zip

Licensed under the MIT License.

View License