Swift syntax is clean and easy to read. Unlike Java/C#, you don't always need a main() function — inside a Playground, code just runs from top to bottom.
import Foundation brings in the Foundation framework so you can use common utilities like dates, strings, and collections. It's not strictly required for a simple print example, but it's widely used in real code.
swift
import Foundation
// Program စတင် run သည့်အခါ ဒီလိုင်းက console ထဲကို text ထုတ်ပြမယ်။
print("Hello, World!")Swift reads code top to bottom. In this example, we import Foundation and print a line of text using the print() function.
You should see
Hello, World!