- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
Collections in Kotlin List, Set, Map, Mutable List, Mutable Set, Mutable Map #list #map #set
Kotlin comes with a bunch of useful collections that give you more flexibility and greater control over how you store and manage groups of objects.
Want to keep a resizeable list that you can keep adding to? Want to sort, shuffle or reverse its contents? Want to find something by name? Or do you want something that will automatically weed out duplicates without you lifting a finger?
Then this is for you.
Arrays can be useful but there are things an array can’t handle. There are two important areas in which arrays fall short.
1. You can’t change an array’s size.
2. Arrays are mutable, so they can be updated.
Let’s look at the main collection types.
List, Set and Map:
Kotlin has three main types of collection—List, Set and Map—and each one has its own distinct purpose:
List - when sequence matters (A list allows duplicate values)
Set - when uniqueness matters
A Set doesn’t allow duplicates, and doesn’t care about the order in which values are held. You can never have more than one element referencing the same object, or more than one element referencing two objects that are considered equal.
Map - when finding something by key matters
A Map uses key/value pairs. It knows the value associated with a given key. You can have two keys that reference the same object, but you can’t have duplicate keys.
Simple Lists, Sets and Maps are immutable, which means that you can’t add or remove items after the collection has been initialized. If you want to be able to add or remove items, Kotlin has mutable subtypes that you can use instead: MutableList, MutableSet and MutableMap. So if you want all the benefits of using a List and you want to be able to update its contents, use a MutableList.
Telegram Group: https://t.me/androidNinjaWarrior
Guide to watch:
00:30 Why use Collection in Kotlin?
07:37 Collection and it's type
08:37 How List works in Kotlin?
20:34 How Mutable List works in Kotlin?
39:45 How Set works in Kotlin?
48:35 How Mutable Set works in Kotlin?
54:28 How Map works in Kotlin?
01:09:12 How Mutable Map works in Kotlin?
01:19:38 Revision of Collection in Kotlin
#Collections #kotlin #kotlinCollections #List #Set #Map #MutableList #MutableSet #MutableMap #listOf #setOf #mapOf #mutableListOf #mutableSetOf #mutableMapOf #CollectionOperations #ListOperations #SetOperations #MapOperations
Disclaimer- Some content are used for educational purposes under fair use.
Copyright Disclaimer Under Section 107 of the Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational, or personal use tips the balance in favor of fair use. All credit for copyright material used in the video goes to the respected Owner.
Thank you guys.
Видео Collections in Kotlin List, Set, Map, Mutable List, Mutable Set, Mutable Map #list #map #set канала Android Ninja Warrior
Want to keep a resizeable list that you can keep adding to? Want to sort, shuffle or reverse its contents? Want to find something by name? Or do you want something that will automatically weed out duplicates without you lifting a finger?
Then this is for you.
Arrays can be useful but there are things an array can’t handle. There are two important areas in which arrays fall short.
1. You can’t change an array’s size.
2. Arrays are mutable, so they can be updated.
Let’s look at the main collection types.
List, Set and Map:
Kotlin has three main types of collection—List, Set and Map—and each one has its own distinct purpose:
List - when sequence matters (A list allows duplicate values)
Set - when uniqueness matters
A Set doesn’t allow duplicates, and doesn’t care about the order in which values are held. You can never have more than one element referencing the same object, or more than one element referencing two objects that are considered equal.
Map - when finding something by key matters
A Map uses key/value pairs. It knows the value associated with a given key. You can have two keys that reference the same object, but you can’t have duplicate keys.
Simple Lists, Sets and Maps are immutable, which means that you can’t add or remove items after the collection has been initialized. If you want to be able to add or remove items, Kotlin has mutable subtypes that you can use instead: MutableList, MutableSet and MutableMap. So if you want all the benefits of using a List and you want to be able to update its contents, use a MutableList.
Telegram Group: https://t.me/androidNinjaWarrior
Guide to watch:
00:30 Why use Collection in Kotlin?
07:37 Collection and it's type
08:37 How List works in Kotlin?
20:34 How Mutable List works in Kotlin?
39:45 How Set works in Kotlin?
48:35 How Mutable Set works in Kotlin?
54:28 How Map works in Kotlin?
01:09:12 How Mutable Map works in Kotlin?
01:19:38 Revision of Collection in Kotlin
#Collections #kotlin #kotlinCollections #List #Set #Map #MutableList #MutableSet #MutableMap #listOf #setOf #mapOf #mutableListOf #mutableSetOf #mutableMapOf #CollectionOperations #ListOperations #SetOperations #MapOperations
Disclaimer- Some content are used for educational purposes under fair use.
Copyright Disclaimer Under Section 107 of the Copyright Act 1976, allowance is made for "fair use" for purposes such as criticism, comment, news reporting, teaching, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational, or personal use tips the balance in favor of fair use. All credit for copyright material used in the video goes to the respected Owner.
Thank you guys.
Видео Collections in Kotlin List, Set, Map, Mutable List, Mutable Set, Mutable Map #list #map #set канала Android Ninja Warrior
Комментарии отсутствуют
Информация о видео
12 марта 2026 г. 16:30:21
01:23:51
Другие видео канала





















