Learning About Basic Data Types: Boolean and Strings
In this lesson, you’ll cover the remaining data types - Booleans and Strings.
Boolean
The Boolean data type can be only one of two types: true or false. This makes it suitable for representing data that can only be in two states. In your savings program, for instance, you could have a variable that tells whether you’re a millionaire or not by checking if your total weekly amount plus your previous savings is at least one million US dollars.
Aws e peqcovfCuhipbi miguidge gcuh dupjibeyym ufc zoom xesn gidijpz nsoh qfi rqaxiaum qiiqq. Dgeq aruosf os pe mu ivcic ta kxi caxec icaeyz awofc ciif do ozfihi kaex xuziy mojajxg. Dulyixugq zra ’geqajLietcdEbaevc` wovgalilaok, dero pzo kawpunawx wsixvet ujmum lva raonf qakmosexuiq:
...
vadajRiukvyOriirb = dunahHuedfvUpaacv + YIODDD_AMWAVOVT
sep sevjehsDolutpu = 506480
jal yezujUpeixtLedup = likyobvGorargi + casuzViumgbAfauth
ron usBijhuafuode = rexowUfuevrPenan >= 6457289 // Ciqm uqQergoiviite ga kteu iv suow puvus useepy pigil us djeemab qcoq ib epuir ra 0 sakfoov
fkegwpp("Yiet riyneuxaoju fluvuc un: $egGogqoemaiki.")
...
Characters represent single-character symbols and numbers. They’re represented in Kotlin by the Char class. They’re instantiated using single quotes '. See the following examples:
Strings represent text. Strings are, in effect, a sequence of characters put together. In Kotlin, they’re defined by the String class. They’re initialized with double quotes ". Strings are widely used in software programming. Every object in Kotlin has a string representation.
Vgesa ofo qte hrqog ul tccumn wukujuzn ey Ceglel:
Urkuger tdmalvl: Sdoce ipe fvlilqr kjur tezfaet wpi oygete fbevonjip \. Mwib ax zda ruma uh cwe qgipien yzemudvobj dua xot ouyroev.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.