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 lambda expressions

    JAVA 25 SELF
    21 level,0 lecture
    In this lecture, we’ll break down lambda expressions in Java: what they are and why they’re needed, how the syntax and shorthand work, how lambdas relate to functional interfaces ( @FunctionalInterface), how they differ from anonymous classes, and how variable capture works ( final / effectively final). With practical examples using Runnable, Consumer, Comparator, Function, and the Stream API, we’ll see how to write shorter and clearer code. We’ll finish with a “Common mistakes” section and tips on how to avoid them.
    Open
  • Method References (::): references to methods

    JAVA 25 SELF
    21 level,1 lecture
    A quick guide to method references in Java: where and how to use a method reference instead of lambdas. We will cover 4 forms: Class::method (static and “on an instance”), object::method, Class::new. We’ll understand signature matching with functional interfaces, compare with lambda expressions, look at practical examples with forEach, sort, map, and discuss common pitfalls (signature mismatches, method overloading, etc.).
    Open
  • Default methods in interfaces

    JAVA 25 SELF
    21 level,2 lecture
    In this lecture we look at why Java 8 introduced default methods in interfaces, how they allow evolving an API without breaking old code, their syntax (the default keyword before the return type) and behaviour in implementations. Using examples from the standard library ( List: forEach, replaceAll, sort) we’ll review practical usage. We’ll discuss limitations: you cannot override Object methods ( equals/ hashCode/ toString), as well as the rules for resolving conflicts with multiple interface implementation and common mistakes.
    Open
  • Static methods in interfaces

    JAVA 25 SELF
    21 level,3 lecture
    We will examine how and why interfaces in Java received static methods: declaration syntax, differences from default methods, key constraints (not inherited, not overridden, callable only via the interface name, access only to static members, support for private static since Java 9+). In practice, we will look at Movable.resetPosition(), a helper Logger, collection factories List.of()/ Set.of()/ Map.of(), and the utility Comparator.reverseOrder(). Finally — common mistakes and how to avoid them.
    Open
  • Interfaces from the standard library: Comparable, Serializable, etc.

    JAVA 25 SELF
    21 level,4 lecture
    We break down the key interfaces of the Java standard library and why they matter in real projects: natural ordering via Comparable<T> and custom rules with Comparator<T>, object serialization with Serializable, safe resource management through AutoCloseable, collection traversal thanks to Iterable<T>, as well as marker Cloneable and event listeners. With hands-on examples we will see the correct method signatures ( compareTo, compare, close, iterator) and common mistakes to avoid.
    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