bal run hello.bal Variables & Types int age = 30; string name = "Alice"; boolean active = true; float pi = 3.14; decimal precise = 10.0d; byte[] data = [1, 2, 3]; json j = "name": "Bob" ; xml x = `<person>John</person>`; Optional Types & Error Handling Ballerina uses optional types ( T? ) and error union types ( T|error ).
worker w2 returns int return 20;
import ballerina/test; @Test function testAddition() int result = 2 + 2; test:assertEquals(result, 4); ballerina
brew install ballerina
curl -fsSL https://dist.ballerina.io/downloads/install.sh | bash Use the MSI installer. bal run hello