Char 

This type is used to represent characters. A character is a unit of information that roughly corresponds to a grapheme, or a grapheme-like unit or symbol. In Kotlin, characters are of the Char type. Characters in single quotes in Kotlin, such as a, $, %, and &, are all examples of characters:

val c: Char = 'i' // I am a character

Recall we mentioned earlier that a string is a sequence of characters:

var c: Char
val sentence: String = "I am made up of characters."

for (character in sentence) {
c = character // Value of character assigned to c without error
println(c)
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.190.239.166