Vidyalelo
Computer Science · Q192

Kotlin Programming MCQ for Competitive Exams, Interviews, and Certifications

Engineering and GATE · Computer Science · question 192

Q192

What is the key difference between Iterable and Sequence in Kotlin?

A.
Iterable<T> works only on immutable collections, Sequence<T> is also applicable to mutable ones
B.
Sequences are processes sequentially, Iterables in parallel (multithreaded)
C.
Sequences are processed lazily, iterables eagerly
Answer
D.
There is no difference, as Sequence<T> is Kotlin's term for Iterable<T>

Answer: Option C

Solution

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