Arrays are mutable, indexed collections of values. Array[T] is Scala's representation for Java's T[].
Array:
可变
用下标访问,利于随机访问
是Java数组的一种表示
List is a class for immutable linked lists representing ordered collections
of elements of type A.This class comes with two implementing case classes scala.Nil and scala.:: that implement the abstract members isEmpty, head and tail.This class is optimal for last-in-first-out (LIFO), stack-like access patterns. If you need another access
pattern, for example, random access or FIFO, consider using a collection more suited to this than List.
List:
不可变
为后进先出做了优化,像栈一样的访问模式
支持用::在模式匹配中取出head和tail