You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The multi line string will contain a lot of whitespace if you don't call trimMargin
The when snippet is wrong. The branch isOdd(x) will never be triggered because it compares the value of the string x to the boolean result of the call. If you want to have method calls in the when branches, you need to pull the argument out of the when-expression.
The correct name for "Tuples" is "Data Classes" paired with "Destructuring". Tuples are something different.
The correct name for "Object instance" is "Constructor call"
You can leave out the body of a class if it's empty
The correct name for "Attributes" is "Primary Constructor"
A better name for "Multiple Constructors" is "Optional Arguments in Constructors (as alternative to overloaded constructors)"
The text was updated successfully, but these errors were encountered:
val name = null
is of typeNothing?
trimMargin
when
snippet is wrong. The branchisOdd(x)
will never be triggered because it compares the value of the stringx
to the boolean result of the call. If you want to have method calls in thewhen
branches, you need to pull the argument out of thewhen
-expression.The text was updated successfully, but these errors were encountered: