CodeGym
AI Academy
Promotion
CodeGym University
Learning
Courses
Tasks
Surveys & Quizzes
Games
Help
Schedule
Community
Users
Forum
Chat
Articles
Success stories
Activity
Reviews
Subscriptions
Light theme

Lessons

  • Reviews
  • About us
Start
Start learning
Start learning now
  • My Progress
  • Courses
  • University
  • Quest Map
  • Lessons
  • Creating collections

    Kotlin SELF
    Level 19, Lesson 0
    We break down why fixed-size arrays quickly become inconvenient in “real-world” programs, and how Kotlin collections solve this problem. We will compare the basic containers List/ Set/ Map, understand the difference between read-only and mutable interfaces ( List vs MutableList), reinforce the important rule about val and object mutability, learn to create collections via listOf, mutableListOf, setOf, mapOf, and also correctly initialize empty collections with type hints. At the end — a mini sketch of a console app and common beginner mistakes.
    Available
  • List and MutableList — order, indices, basic operations

    Kotlin SELF
    Level 19, Lesson 1
    We’ll break down how the read-only List<T> differs from the mutable MutableList<T>, how indices work (from 0 to lastIndex), why you must not confuse size and lastIndex, and which operations you typically need in practice: reading via [ i ] / get, replacing via set, adding add, deleting removeAt/ remove, and checking with contains / the in operator.
    Available
  • Set and MutableSet — uniqueness and membership checks

    Kotlin SELF
    Level 19, Lesson 2
    Let’s break down why Kotlin needs sets: how Set differs from List, why Set stores only unique elements, how add()/ remove() operations work with a Boolean result, membership checking via contains() and the in operator, as well as a quick way to “remove duplicates” using toSet(). At the end — a practical mini example with expense tracking and a walkthrough of typical mistakes.
    Available
  • Map and MutableMap: reading V?, updating by key, the “counter” pattern

    Kotlin SELF
    Level 19, Lesson 3
    We break down how Map<K, V> and MutableMap<K, V> work in Kotlin: why reading map[key] returns V?, how to correctly handle a missing key using ?: and a key in map check, how to write/update values via map[key] = value, delete via remove, and how to apply the practical “counter” pattern for counting and summing by categories.
    Available
  • Generics on collections + a minimal data structure for the practical project

    Kotlin SELF
    Level 19, Lesson 4
    We cover generics on Kotlin collections: how to “read” types like List<String> and Map<K, V>, why empty collections need an explicit type, why access map[key] always returns nullable ( V?), how not to kill readability with nested types, and how to assemble a minimal data structure for a console mini expense tracker using Triple, Pair, MutableList, and MutableMap. At the end: typical mistakes and practical habits (read-only API, key normalization).
    Available
Learn
  • Registration
  • Java Course
  • Help with Tasks
  • Pricing
  • Java Syntax
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Success Stories
  • Activity
  • Affiliate Program
Company
  • About us
  • Contacts
  • Reviews
  • Press Room
  • CodeGym for EDU
  • FAQ
  • Support
CodeGym CodeGym is an online course for learning Java programming from scratch. This course is a perfect way to master Java for beginners. It contains 1200+ tasks with instant verification and an essential scope of Java fundamentals theory. To help you succeed in education, we’ve implemented a set of motivational features: quizzes, coding projects, content about efficient learning, and a Java developer’s career.
Follow us
Interface language
English
Deutsch Español हिन्दी Français Português Polski বাংলা 简体中文 मराठी தமிழ் Italiano Bahasa Indonesia 繁體中文 Nederlands 日本語 한국어 Bulgarian Danish Hungarian Basa Jawa Malay Norwegian Romanian Swedish Telugu Thai Українська Filipino Turkish Azərbaycan Русский Vietnamese
Programmers Are Made, Not Born © 2026 CodeGym
MastercardVisa
Programmers Are Made, Not Born © 2026 CodeGym