Vidyalelo
Computer Science · Q270

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications

Engineering and GATE · Computer Science · question 270

Q270

In the file main.kt, you ae filtering a list of integers and want to use an already existing function, removeBadValues. What is the proper way to invoke the function from filter in the line below? val list2 = (80..100).toList().filter(_____)

A.
::removeBadValues
Answer
B.
GlobalScope.removeBadValues()
C.
Mainkt.removeBadValues
D.
removeBadValues

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board