August 2017
Intermediate to advanced
440 pages
10h
English
Boolean is a logic type that has two possible values: true and false. We can also use the nullable Boolean type:
val isGrowing: Boolean = true
val isGrowing: Boolean? = null
The Boolean type also supports standard built-in operations that are generally available in most modern programming languages:
Keep in mind that we can only use a not-null Boolean for any type of condition.
Like in Java, in || and && predicates are evaluated lazily, and only when needed (lazy conjunction).
Read now
Unlock full access