Answer Posted / Tauqeer Ahmad
In Scala, Arrays are fixed-size, mutable data structures with homogeneous elements, whereas Lists can be either mutable or immutable (ListBuffer for mutable lists, List for immutable lists) and can contain heterogeneous elements. Arrays have faster access times than lists due to their contiguous memory allocation, but lists are more flexible in terms of their size and element types.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers