Skip to content

Instantly share code, notes, and snippets.

@YugandharVadlamudi
Created August 4, 2018 07:47
Show Gist options
  • Save YugandharVadlamudi/f453347cd2382cba728799a9d8e1fdd6 to your computer and use it in GitHub Desktop.
Save YugandharVadlamudi/f453347cd2382cba728799a9d8e1fdd6 to your computer and use it in GitHub Desktop.
fun main(args: Array<String>) {
//To accept any datatype we have to use Any datatype
var anyDatatype: Any = 1 //it is accepting Int
println("the value is ${anyDatatype} ")
anyDatatype="Hello" // it is accepting String
println("the value is ${anyDatatype} ")
}
###Output###
the value is 1
the value is Hello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment