Simple case

Let's look at one simple case:

for ( i in 1..5){  println(i)}

It will iterate from 1 to 5 inclusive because we have used them in the in keyword.

Get Spring 5.0 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.