Follow below steps to create your first kotlin Project in intelliJ IDE.
We have executed a program, lets discuss about the components in the programs, I have highlighted them below.
Comments are nothing but a informational lines for the user.
Compiler doesn't count the comments as the member for compilation, so whatever is present in comment, compiler will ignore them.
There two types of comments :
fun is keyword used to denote that, this block is a function
this is nothing but a function name, it could contain any name, main function is the place where the execution starts.
this is parameter name, an function can accept n-number of parameters. Parameter follows all the variables properties
this is nothing but the parameter type, unlike other languages, In kotlin variable comes first and then variable type. Types could be anything, here we are accepting Array with generic
braces are used to contains the elements inside the block, if we write outside anything then it belongs to other function or to class
println() is nothing but a function which will direct the given value into console of the ide/terminal
this value could be any type, and this value will be redirected to console after resolving the values (as of this, we have not elements to resolve)