Created
August 4, 2018 07:47
-
-
Save YugandharVadlamudi/f453347cd2382cba728799a9d8e1fdd6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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