• Top Posts

    If Else in Kotlin

    Example Program: 
    fun main(args : Array<String>)
    {
    var a : Int = 10
    var b : Int = 2

    var Max :Int

    if (a > b)
    Max = a
    else
    Max = b


    println("Max value is :"+Max)

    }

    Result:

    Max value is :10





    No comments

    Post Top Ad

    ad728

    Post Bottom Ad

    ad728