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

Lectures

  • Reviews
  • About us
  • CS50
Start
Start learning
Start learning
  • My progress
  • Courses
  • Quest map
  • Lectures
  • Introduction to the Stream API: why you need streams

    JAVA 25 SELF
    30 level,0 lecture
    In this lecture we explore why the imperative approach to processing collections quickly accumulates boilerplate, and how the Stream API shifts code to a declarative style: chains of operations like filter, map, collect, simple composition, fewer mistakes, and easy parallelism via parallelStream(). We will cover use cases, the history of the feature, and common pitfalls to avoid.
    Open
  • Basic Stream API operations: map, filter, collect

    JAVA 25 SELF
    30 level,1 lecture
    A step-by-step introduction to the basic Stream API operations: how to get a stream from a collection and an array ( stream(), Arrays.stream, Stream.of), how intermediate operations ( filter, map, distinct) differ from terminal ones ( collect, forEach, count), and how to collect results using Collectors ( toList, toSet, joining). Practical examples, mini‑tasks, and a section on common mistakes will help you quickly master pipeline processing of data.
    Open
  • Stream API subsets: distinct, limit, skip

    JAVA 25 SELF
    30 level,2 lecture
    In this lecture, we break down three key Stream API operations for working with data subsets: distinct (removing duplicates), limit (restricting the number of elements), and skip (skipping the first elements). You will see how they work on collections of strings and objects, how the implementation of equals/ hashCode affects the result of distinct, how to combine operations for pagination and top‑N selection, and which mistakes occur most often.
    Open
  • forEach and peek methods: side effects

    JAVA 25 SELF
    30 level,3 lecture
    In this lecture, we cover stream operations for side effects: the terminal forEach and the intermediate peek. We’ll understand when and why to use them, how they differ, why after forEach the stream “closes”, while peek doesn’t change data and runs only when there’s a terminal operation. We’ll show practical examples, discuss non-obvious points, and typical mistakes (including ConcurrentModificationException and incorrectly replacing collect with forEach).
    Open
  • Transforming Collections with Streams

    JAVA 25 SELF
    30 level,4 lecture
    A practical guide to transforming collections using Stream API: converting List ↔ Set, building maps via Collectors.toMap() (including handling duplicates), joining into a string with Collectors.joining(), and a breakdown of terminal and intermediate operations ( forEach, collect, count, anyMatch, etc.). Inside, you’ll find clear examples, explanations, and common mistakes.
    Open
Courses
  • Java Course
  • Python Course
  • Development with Claude Code
  • All 16 courses
University
  • Java FullStack
  • Python FullStack
  • AI Native Developer
  • Web FullStack
Community
  • Articles
  • Forum
  • Help with Tasks
Company
  • About us
  • Contacts
  • Reviews
  • Pricing
  • Questions and answers
JavaRush JavaRush: online courses in Java and other programming languages, where you learn by solving tasks. We started in 2012 with a Java course, and today there are 16 courses: Java and Spring, Python, web development, SQL, Go, C#, C++, Kotlin, Swift, Docker and AI development. More than 10,000 tasks with instant checks, and the first level of any course is free. Learn on your own or with a mentor at JavaRush University.
Follow us
Язык интерфейса
Русский
English
Українська
"Programmers are not born" © 2026 JavaRush Terms of Use and Privacy policy
MastercardVisa
"Programmers are not born" © 2026 JavaRush Terms of Use and Privacy policy