• Top Posts

    For Loop in Kotlin


    Example for program
    /* arula.in */

    fun main(args : Array<String>)
    {
    var arrayval : Array<Int> = arrayOf(1,5,6,3,4)
    for ( i in arrayval)
    {
    println("value of arrayval : "+i)
    }


    }

    Result

    value of arrayval : 1
    value of arrayval : 5
    value of arrayval : 6
    value of arrayval : 3
    value of arrayval : 4

    No comments

    Post Top Ad

    ad728

    Post Bottom Ad

    ad728