Last active
November 12, 2018 07:56
-
-
Save ozcanzaferayan/c9aafa3432b7a074ca904bceb77c4aaa to your computer and use it in GitHub Desktop.
Kotlin Nedir 2: Tip kontrolü
This file contains 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 isString(obj: Any): String { | |
return if (obj !is String) | |
"String değildir" | |
else | |
"String'tir." | |
} | |
fun main(args: Array<String>) { | |
// Çıktısı: String değildir | |
print(isString(40)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment