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
  • Inner classes (non-static inner)

    JAVA 25 SELF
    16 level,0 lecture
    Let’s unpack inner (non-static inner) classes in Java: what they are and how they are tied to an instance of the outer class, how to declare and create them via outer. new Inner(), how they gain access to members with private/ public modifiers, what restrictions exist (no static members except constants), as well as visibility options and practical examples: Backpack.Item, an iterator of your own collection, and referring to the outer object via OuterClassName. this. In the end—common mistakes and how to avoid them.
    Open
  • Static nested classes (static nested)

    JAVA 25 SELF
    16 level,1 lecture
    We break down static nested classes in Java: what they are, how they differ from inner classes, how to declare them with the static modifier, how to create instances without an instance of the outer class, and what access rules apply (no OuterClass.this, access only to static members). We’ll show practical scenarios— Builder, internal Node nodes in data structures, utilities—compare with inner classes, add a diagram, and go through typical mistakes: confusion with outer.new Inner() and the correct call new Outer.Nested().
    Open
  • Anonymous classes

    JAVA 25 SELF
    16 level,2 lecture
    In this lecture, we examine anonymous classes in Java: what they are, how they are declared and created at the point of use, how the compiler names their .class files, limitations (final/effectively final, no constructor, initializer blocks), and practical usage scenarios. We will show access to members of the enclosing class and go through common mistakes.
    Open
  • Local classes: declaring inside methods

    JAVA 25 SELF
    16 level,3 lecture
    We break down local classes in Java: what they are, how to declare them inside methods and blocks, what restrictions apply to modifiers and static members, and how access to method variables works (only final/ effectively final). We’ll compare them with anonymous classes, look at practical examples (a comparator, a temporary data structure, a mini test result), and typical mistakes. You’ll understand when a local class is more appropriate than an anonymous one and why it’s important to remember static and public/ private/ protected.
    Open
  • Introduction to generics

    JAVA 25 SELF
    16 level,4 lecture
    A practical introduction to Generics in Java: why storing in Object is risky, how to declare generic classes and methods, how to use Box<T>, pairs, and generic methods, and what advantages type safety provides without explicit casts. We’ll discuss limitations (primitives, type erasure) and go through usage examples.
    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