Swan Lake Beta3 is here.
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!
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!
Subscribe to the newsletter

In the creation of Ballerina, we were inspired by so many technologies. Thank you to all that have come before us (and forgive us if we missed one): Java, Go, C, C++, D, Rust, Haskell, Kotlin, Dart, TypeScript, JavaScript, Python, Perl, Flow, Swift, Elm, RelaxNG, NPM, Crates, Maven, Gradle, Kubernetes, Docker, Envoy, Markdown, GitHub and WSO2.

Cookie Policy

This website uses cookies so that we can provide you with the best user experience. Read our Cookie Policy to find out more.

If you wish to disable cookies you can do so from your browser.

I Understand