This course will be retired on July 14, 2025.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Introduction to Scala!
You have completed Introduction to Scala!
A list is another data structure which maintains the order of the elements, allows for duplication and is immutable. Similarly to the ArrayBuffer, the ListBuffer is the mutable form of a list.
New Terms:
List -- A list is an immutable data structure which can contain duplicates and maintains the order if its elements.
ListBuffer -- A ListBuffer is the mutable implementation of a list.
Further Reading:
Lists
ListBuffers
Nil documentation
List documentation & methods
ListBuffer documentation & methods
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up