Kotlin Tutorial

Kotlin Classes

Kotlin Output:

In the previous chapter we used the function println(). This is used to output/print text:

For Example:

					fun main(args: Array<String>) {
   println("Hello World!")
   println("Kotlin is easy")
   println("Kotlin is best language")


There are two types of print functions, the one we used is println() and the other is print(). The only difference between them is that the print without ln does not insert a new line at the end of the output but the one which has ln does.

					fun main(args: Array<String>) {
   print("Hello World!")
   print("Kotlin is easy")
   print("Kotlin is best language")


Run the code above to see the difference.