KOTLIN BASIC CONCEPTS - Char, String & Boolean Types
► BOOLEANS
1. The type Boolean represents boolean objects that can have
two values: true or false
2. Logical OR i.e. ||, logical AND i.e. && and logical not
i.e. ! Operators can be used on boolean type variables.
3. Kotlin also supports SHORT CIRCUIT BOOLEAN expressions
► CHARACTER TYPE
1. Characters are represented using Char data type.
2. Character literals go inside single quotes e.g. val grade = ‘A’
3. Koltin also uses UNICODE character specification.
ESCAPE SEQUENCES
1. \t – tab
2. \b – backspace
3. \n – new line
4. \r – carriage return
5. \’ – single quote
6. \” – double quote
7. \\ - backlash
8. \$ - dollar sign
► STRING TYPE
1. Strings in Kotlin are represented using String data type
2. Strings are immutable. Once you initialize the a string, you
can’t change it’s value or assign new value.
3. All operations which transforms strings returns new String
object leaving original string unchanged.
ACCESSING STRING CHAR BY CHAR
1. String can be accessed char by char via the indexing operation
i.e. you can treat string as array of chars and can access i th
index element of string using indexing operation e.g. str[ i ]
2. + operator can be used for string concatenation.
► MULTILINE STRINGS
1. Multiline strings can contain newlines and arbitrary text.
2. It is delimited by a triple quote i.e. “““
3. This type of string does not require escape sequence for
special characters except $ symbol
4. Example: val str: String = “““Kotlin language is Google’s
Choice for Android App Development”””
► STRING TEMPLATES
1. String literals may contain template expressions i.e. pieces of
the code that are evaluated and whose results are
concatenated into a string.
2. A template expression starts with a dollar sign and consists or
either variable name or an expression in curly braces.
#kotlin
#kotlintutorials
#android
#kotlinbasics
On this page of the site you can watch the video online 1-7 Kotlin Basic Concepts - Char, Boolean, String with a duration of hours minute second in good quality, which was uploaded by the user Ace The Code 29 August 2025, share the link with friends and acquaintances, this video has already been watched 17 times on youtube and it was liked by 1 viewers. Enjoy your viewing!