7/14/2023 0 Comments For range kotlincharacters is an objects of CharProgression type.numbers is an object of IntProgression type.Val characters = 'c'.downTo('a') // c b aīoth of these samples create Progressions, and we can use a different form of creating ranges. In this case, the Progression object will be created. Suppose we want to create a sequence of numbers from the largest number number to the smallest one. In Kotlin defined specific types for arithmetic progressions of Char, Int and Long. Ranges are defined for comparable types: having an order, you can define whether an arbitrary instance is in the range between two given instances.
0 Comments
Leave a Reply. |