


Read more Predefined Ranges: CharRange IntRange LongRange In Kotlin defined specific types for arithmetic progressions of Char, Int and Long. Range instantiation and range checks: a.b, x in a.b, x !in a.b Ranges are defined for comparable types: having an order, you can define whether an arbitrary instance is in the range between two given instances. The main operation on ranges is contains, which is usually used in the form of in and in operators.

Kotlin ranges are created with rangeTo () function, or simply using downTo or (.) operators. The operations on floating-point numbers discussed in this section are: Kotlin range is defined by its two endpoint values which are both included in the range. Here is the complete list of bitwise operations:
