...

Mobile App Development - Kotlin

Back to Course

Lesson Description


Lession - #386 Kotlin Syntax


  • Package spefication should be at the top of the source file.

     
  • A entry point of a Kotlin application is the main function.





     

    Let's see an example

    
    
    // package not required for this program
    fun main(>
    { var i=10; println("Hello, world!!!">
    println(i>
    ; }
     

    Output


    Try it here

    How would I utilize Kotlin Spring Boot application?
    Send off IntelliJ IDEA and open the starter project. Gradle will begin synchronizing the project, which could require several minutes. In your Spring Boot project, you'll observe the web application code in the src organizer. You'll compose the Kotlin code inside the primary/kotlin organizer.

    What is tuple in Kotlin?
    The kotlin tuple is defined as one of the type and it is default method used for to calculate the expression

    kotlin REPLRead- Eval- Print- Loop. Kotlin Playground online :