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
  • The Programmer’s Path

    Kotlin SELF
    Level 13, Lesson 0
    In this lecture you will learn how a programmer’s career is built: from the first steps to the Senior level, what salaries exist in the industry, how to choose a development direction, what career branches exist, and why programmers are often happy and in demand. The material will help you understand how to plan your professional growth and what you can realistically achieve in 5 years in IT.
    Available
  • when ( value ) as a replacement for if/ else if

    Kotlin SELF
    Level 13, Lesson 1
    We break down the when ( value ) construct as a more readable replacement for a long if/ else if chain: the basic branch syntax with the -> operator, the role of the else branch, blocks {... } inside branches, top-to-bottom checking order, and also a practical example of a console menu with safe input parsing via toIntOrNull(), early exit with return, and repeated input via continue.
    Available
  • when as an expression

    Kotlin SELF
    Level 13, Lesson 2
    We break down how to use when in Kotlin specifically as an expression: assign the result to a val, return a value from a fun, keep an eye on exhaustiveness (why you almost always need else), understand what a block-branch returns and why println inside branches can lead to Unit. We also look at practical cases: “dictionary-like” functions, handling null for Int ? via toIntOrNull, and an example without else for Boolean.
    Available
  • Validation with when: in/!in, ranges

    Kotlin SELF
    Level 13, Lesson 3
    We break down how to use when for validation and data classification: checks via in and ! in, ranges a .. b (for Int and Char), grouping values with commas, “early guarding” against garbage input, and why branch order in when matters. At the end: a cheat sheet, a mermaid diagram of the validation pipeline, and common beginner mistakes.
    Available
  • Command dispatching: input normalization and when

    Kotlin SELF
    Level 13, Lesson 4
    We break down how to build a simple CLI command dispatcher in Kotlin with when: why normalize input using trim() and lowercase(), how to handle an empty line separately ( isEmpty()), how to manually split “command + argument” using indexOf and substring, and how to safely parse numbers with toIntOrNull(). At the end, we assemble a mini-project “Wallet v0” and pin down common mistakes.
    Available
  • Errors and style in when

    Kotlin SELF
    Level 13, Lesson 5
    We break down why when sometimes turns into a source of bugs: overlapping conditions and dependence on branch order, correct work with else (statement vs expression and exhaustiveness), and how to keep branches short and turn command dispatching into a neat “table”. We show hands-on practice with range validation examples ( in/ ! in), command parsing, and a mini input-processing pipeline.
    Available
  • Alternate reality: the new gold rush for AI talent

    Kotlin SELF
    Level 13, Lesson 6
    In this article, you will learn how artificial intelligence has transformed the IT job market: why the largest corporations are fighting for AI talent, what compensation top specialists are being offered, how the role of universities and open source is changing, and what it means for everyday programmers. Welcome to a new era where brains are the most expensive currency!
    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