Translate

Tuesday 5 October 2021

Looping in Groovy Scripting groovy training telugu 32

 Watch This Video

https://youtu.be/KuEJVM7iJv0

---------------------------------------------------------------------------------------------------------


//Looping
//while

List numbers=[1,2,3]
while(numbers)
{
//do something
numbers.remove(0)
}

assert numbers ==[]

//for

List nums=[1,2,3,4]
for(Integer i in 1..10){
println i
}
for(j in 1..5)
{
println j

}

No comments:

Post a Comment

Note: only a member of this blog may post a comment.