Groovy Quiz 19 | Lists | Part-3


Reference video | Groovy Playground


1 Point for every correct answer | Let’s Get Started

1.

def myList = [1,2,3,5, 4]
myList = myList.sort()
print myList
 
 
 

2.

def myList = [1,2,3]
print myList.isEmpty()
 
 

3.

def myList = [1,2,3]
myList.clear()
print myList.isEmpty()
 
 

5