import ballerina/io;

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

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 
# `hello_world.bal` file and use `bal run` command.
bal run hello_world.bal
Hello, World!