Skip to content

Instantly share code, notes, and snippets.

@ozcanzaferayan
Last active November 12, 2018 07:56
Show Gist options
  • Save ozcanzaferayan/c9aafa3432b7a074ca904bceb77c4aaa to your computer and use it in GitHub Desktop.
Save ozcanzaferayan/c9aafa3432b7a074ca904bceb77c4aaa to your computer and use it in GitHub Desktop.
Kotlin Nedir 2: Tip kontrolü
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