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
  • Primitive streams and the cost of boxing

    JAVA 25 SELF
    33 level,0 lecture
    In this lecture, we’ll look at why regular streams of numeric collections ( Stream<Integer>, Stream<Double>) can be inefficient due to boxing/unboxing, and how primitive streams — IntStream, LongStream, DoubleStream — help avoid it. We’ll cover conversions like mapToInt/ boxed(), aggregation operations ( sum(), average(), summaryStatistics()), safe results with OptionalInt/ OptionalDouble, as well as where optimization actually delivers gains and how to measure the effect with JMH.
    Open
  • Lazy evaluation in the Stream API

    JAVA 25 SELF
    33 level,1 lecture
    In this lecture, we explain how lazy evaluation works in the Stream API: how intermediate and terminal operations differ, why computations start only after a terminal is invoked, and what advantages per-element processing and “short-circuit evaluation” provide. We will show chains with filter, map, peek, findFirst, forEach, visualize how elements flow through the pipeline, and cover typical mistakes and recommendations for an efficient order of operations.
    Open
  • Immutable collections: Collections.unmodifiable

    JAVA 25 SELF
    33 level,2 lecture
    In this lecture, we examine how to protect data using immutable wrappers Collections.unmodifiableList, unmodifiableSet, unmodifiableMap; how “shallow” immutability differs from “deep” immutability; when and why to return wrappers from methods; and modern alternatives List.of/ Set.of/ Map.of. We will talk about typical mistakes (for example, expecting deep immutability or working with null) and why modification attempts end with UnsupportedOperationException.
    Open
  • Spliterator and parallel streams

    JAVA 25 SELF
    33 level,3 lecture
    In this lecture we break down what Spliterator is, how it allows not only iterating elements but also splitting the data source into parts using trySplit(), how parallel streams are built on top of this via parallelStream() and the common ForkJoinPool. We show the key methods ( tryAdvance, estimateSize, characteristics), typical characteristics ( ORDERED, SIZED, CONCURRENT, etc.), practical examples, a Mermaid diagram, and common mistakes when using parallel streams.
    Open
  • Custom Collector and Spliterator

    JAVA 25 SELF
    33 level,4 lecture
    This lecture explains how to write custom collectors for the Stream API with Collector and when it is truly justified, as well as how to implement your own Spliterator for efficient sequential and parallel data traversal. We will step through the collector components ( supplier, accumulator, combiner, finisher, characteristics), examples for multi-maps and top-N, trySplit strategies, and the correct setup of characteristics ( ORDERED, SIZED, SUBSIZED, etc.).
    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