First Kotlin Program

Here’s your first Kotlin Program-

fun – used for defining that we are using a function/method.

main – name of the data type (function).

() – what does this data type (main as defined) contain?

{ … } – the data type (main as defined) starts with and ends with } , we add the data type (main as defined) code between these two brackets.

print() – function already a method in the programming language which is print whatever is inside () and if we are defining a custom text then we use double quotation (“”) marks in the ().

Source Code for First Kotlin Program-

package (package name)

fun main(args:Array<String>) {

print(Hello World!)