Twitter Facebook Delicious Digg Stumbleupon Favorites More

Sunday 22 July 2018

kotlin when

fun main(args:Array<String>)
{
    var age:Int=19    age=16    when(age)
    {
        17-> println("17")
        18-> println("18")
        19-> println("yep 19")
        else ->
        {
           println("none of the above")
        }
    }
}
  • OUTPUT none of the above
  • 2
Share:

0 comments:

Post a Comment

Search This Blog

Popular Posts

Pages

how to make crores from 1 lakh in stock markets in 1 year

how to make crores from 1 lakh in stock markets in 1 year

Blogger Tutorials

Blogger Templates

Sample Text

Copyright © ANDROID TUTORIAL CODE | Powered by Blogger
Design by SimpleWpThemes | Blogger Theme by NewBloggerThemes.com & Distributed By Protemplateslab