import ballerina/io;function main (string[] args) {
    io:println("Hello, World!");
}

Hello World

Let's print "Hello, World!" using Ballerina. Here's the full source code.

import ballerina/io;
function main (string[] args) {
    io:println("Hello, World!");
}
$ ballerina run hello-world.bal
Hello, World!

To run the program, put the code in “hello-world.bal” and use “ballerina run” command.