JavaRush
AI Academy
new
Promotion
Learning
Courses
Tasks
Quizzes
Games
Help
Schedule of nudges
Internship
Community
Users
Forum
Chat
Articles
Success stories
Activities
Reviews
Subscriptions
Light theme

Lectures

  • Reviews
  • About us
  • CS50
Start
Start learning
Start learning
  • My progress
  • Courses
  • Quest map
  • Lectures
  • Why classes matter and how to think in objects: your own type and references

    Kotlin SELF
    30 level,0 lecture
    We break down why Kotlin needs classes and how to “glue” data into meaningful entities: why a couple of variables ( title and amount) quickly turns into chaos, why Pair is convenient and why it is dangerous, how to create your own type ( class Expense), and how object references work: assignment copies a reference, the difference between val and var, and how to debug “weird changes” by checking ===.
    Open
  • Class syntax: primary constructor, properties in the header, default values

    Kotlin SELF
    30 level,1 lecture
    We break down class syntax in Kotlin: how the primary constructor works, why parameters without val/ var do not become properties, how to create objects without new, set default values, use named arguments, and format a “readable” class header. At the end — migration from Pair to the Expense model and common mistakes.
    Open
  • Methods and state: behavior next to data, this, and basic checks

    Kotlin SELF
    30 level,2 lecture
    We break down why, in OOP, it is beneficial to keep behavior next to data: we move “external” functions inside a class as methods, learn to call them with dot syntax, and understand why methods “see” an object’s properties. We also discuss mutable state via var, the nuance of a val reference, the role of this when names conflict, as well as invariants and validation via early return, require/ check—so that an object stays correct even with invalid input.
    Open
  • Object collections: MutableList<Expense>, operations, and migrating from Pair

    Kotlin SELF
    30 level,3 lecture
    We break down why domain data is better stored not in Pair<String, Int>, but in a separate class Expense; we learn how to build and modify a MutableList<Expense>, print elements with indices, safely delete via removeAt(), build reports with filter()/ map()/ sortedByDescending()/ fold(), and also make a mini CLI plus a bridge for a “soft” migration from pairs to objects.
    Open
  • Common OOP start-up mistakes: mutability, references, responsibility, names

    Kotlin SELF
    30 level,4 lecture
    We go through the most common pitfalls when taking the first steps in OOP with Kotlin: why uncontrolled var turns a model into jelly, how val protects a reference but not an object, how shared references break expectations in MutableList<Expense>, why the Expense entity should not know about readln()/ println(), and how good names make code shorter and clearer. At the end: a mini-refactoring of BudgetBuddy and a block of typical mistakes.
    Open
Learn
  • Registration
  • Java course
  • Help with tasks
  • Pricing
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Success stories
  • Activities
Company
  • About us
  • Contacts
  • Reviews
  • FAQ
  • Support
JavaRushJavaRush — is an interactive online course for learning Java programming from scratch. It contains 1200 practical tasks with one-click solution checking, the necessary minimum of theory on Java basics, and motivating features that help you complete the course: games, quizzes, interesting projects and articles on effective learning and the career of a Java developer.
Follow us
Язык интерфейса
Русский
English
Українська
"Programmers are not born" © 2026 JavaRush
MastercardVisa
"Programmers are not born" © 2026 JavaRush