- Kotlin Programming By Example
- Iyanu Adelekan
- 109字
- 2021-08-27 20:00:08
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)
}
推薦閱讀
- HTML5+CSS3+JavaScript從入門到精通:上冊(微課精編版·第2版)
- Mastering phpMyAdmin 3.4 for Effective MySQL Management
- 華為HMS生態與應用開發實戰
- Ray分布式機器學習:利用Ray進行大模型的數據處理、訓練、推理和部署
- Python編程與幾何圖形
- Python機器學習基礎教程
- Mastering JavaScript High Performance
- 編程菜鳥學Python數據分析
- Python期貨量化交易實戰
- Deep Learning for Natural Language Processing
- 快樂編程:青少年思維訓練
- Go Systems Programming
- WCF全面解析
- 熱處理常見缺陷分析與解決方案
- Flutter for Beginners