Ranges based Kotlin interview questions and answers

Integer type range


Kotlin Working Ranges

What is Ranges operator in Kotlin?

Ranges operator helps to iterate through a range. Its operator form is (..)  For Example

for (i in 1..15)
print(i)

It will print from 1 to 15 in output.

Kotlin Utility Function

What is Ranges operator in Kotlin?

Ranges operator helps to iterate through a range. Its operator forms are (..)).

Example

  1. for (i in 1..4)
  2. print(i)
Aaaaas

Comments

Popular posts from this blog

Jetpack Compose based Android interview and questions

Null safety based Kotlin interview questions and answers

CustomView based Android interview questions and answers