Kotlin Hello World

fun main(args: Array<String>) {
    println("Hello, World!")
}

Explanation:
 * fun main(args: Array<String>):
   * This line defines the main function, which is the entry point of the Kotlin program.
   * fun is the keyword for declaring a function.
   * main is the name of the function.
   * args: Array<String> is the parameter of the main function, which represents an array of command-line arguments passed to the program.
 * println("Hello, World!"):
   * This line prints the text "Hello, World!" to the console.
   * println() is a built-in function in Kotlin that prints the given string to the console and adds a newline character at the end.
To run this code:
 * Save the code: Save the code in a file named HelloWorld.kt.
 * Compile the code: Use the Kotlin compiler (kotlinc) to compile the code:
   kotlinc HelloWorld.kt -include-runtime -d HelloWorld.jar

 * Run the compiled code:
   java -jar HelloWorld.jar

This will output:
Hello, World!

This is the most basic example of a Kotlin program, demonstrating the fundamental syntax and how to print output to the console.

Comments

🎮 POPÜLER ⭐ 4.5

Ultra Blocks

Klasik Bulmaca · Strateji · Zeka Oyunu

Hızlı düşün, akıllıca istifle ve küresel liderlik tablosunda zirveye oyna! Ultra Blocks, klasik arcade bulmaca mantığını modern strateji ve göz alıcı görsel efektlerle birleştiriyor. Blokları sürükleyip yerleştir, tam satırları temizle ve rekorlarını kır!

🏆 Küresel Sıralama PlayFab ile dünyaya meydan oku
🎨 Özelleştirilebilir Tema Neon’dan klasik ahşaba
📱 Her Cihazda Telefon, tablet, TV ve katlanabilir
👑 VIP Kulüp Reklamsız · Sınırsız döndürme
⬇️ Google Play'den Ücretsiz İndir
📦 50 MB · Çevrimdışı oynanabilir 🔒 Veriler şifrelenir

Popular posts from this blog

Kotlin Android Program (QCR) Application Codes That Read Text in Photos

Kotlin Google Sign in Activity with Layout Example