Back to Examples

Hello world main

Let's write the Hello World program in Ballerina.

import ballerina/io;

public function main() {
    io:println("Hello, World!");
}

To run this sample, place the source code in a file named hello_world.bal and use the bal run command.

$ bal run hello_world.balHello, World!
NextHello world service