Collections
Learn about the various types of collections that exist in Kotlin including lists, sets, and maps.
StartKey Concepts
Review core concepts you need to learn to master this subject
Immutable Lists
Mutable Lists
Accessing List Elements
The Size Property
List Operations
Immutable Sets
Mutable Sets
Accessing Set Elements
Immutable Lists
Immutable Lists
var programmingLanguages = listOf("C#", "Java", "Kotlin", "Ruby")
An immutable list represents a group of elements with read-only operations.
It can be declared with the term listOf
, followed by a pair of parentheses containing elements that are separated by commas.
Lists
Lesson 1 of 3
What you'll create
Portfolio projects that showcase your new skills
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory