1. kotlin-first-program-ide

Kotlin First Program (IDE)


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


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


Hello, World!


  • fun is a keyword in Kotlin used to define a function.
  • main is the name of the function that is executed when the program starts.
  • args is the variable name for an array of command-line arguments.
  • Array<String> is the data type for the args variable, which is an array of strings.
  • println is a function used to print the string "Hello, World!" to the console.


This program is a simple example of how to use Kotlin to print a message to the console.

Important Points

  • Every Kotlin program must have a main function that serves as the entry point for the program.
  • The println function is used to print messages to the console.
  • Kotlin is a statically typed language, meaning that variable types are specified at compile time.


In this Kotlin program, we've used the fun keyword to define a main function that prints the message "Hello, World!" to the console. This program serves as a simple introduction to the Kotlin programming language and its syntax.

Published on: