
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Explore how Java defines a class inside another class, creating a non-static inner class or a static nested class, and how each uses the outer object's members.
Explore anonymous inner classes in Java, covering static nested and inner classes, using new to instantiate anonymous types that extend a class or implement an interface and override toString.
Learn how inner classes access private members of the outer class in Java, and how the outer class accesses private members of nested class, with a computer and CPU example.
Get complete solutions for every coding exercise in inner classes in Java and request extra explanations or videos on topics covered.
This course focuses on Inner Classes, which is one of the most fundamental topics in the Java programming language, and yet, one of the more difficult ones. Having an in-depth understanding of this topic is crucial for mastering many advanced topics, such as lambda expressions, and functional interfaces.
Most of the Java courses these days don't cover the Inner Classes topic in detail, and many simply avoid it. During the years, avoiding this topic wasn't felt, and most of the Java developers did their work without any special difficulties.
With the emergence of lambda expressions, functional interfaces, and streams in Java 8, and with the continuously growing popularity of using them, the necessity of having an accurate and in-depth understanding of inner classes in Java has become very important.
Learn and Master the Inner Classes topic by Taking this Comprehensive Course.
Learn about nested classes and about those cases in which the nested class is also an inner class.
Learn how to define a static nested class and abut the cases in which we can benefit from using it.
Learn how to define an inner class and about the changes the compiler introduces in our code.
Learn about the unique connection created between the object we instantiate from the inner class and the object that was already instantiated from the outer class, that in its presence the inner class was instantiated.
Learn about the limitation that exists when defining an inner class within the scope of a method that was defined in the outer class.
Learn how to define an anonymous nested class, and learn about using it for passing over a specific functionality from one place in our code to another.
I teach Java programming for nearly 25 years. During these years I developed my unique techniques for explaining complex topics, such as the one this course covers. When developing this course I did my best using small simple code samples together with diagrams I create using my iPad (I use it as a replacement for a blackboard). Even though the explanations are simple when hearing them separately, when putting them all together in one length video it becomes more difficult.
I am dedicated to my students and I am available for any question that arises. In the case that an additional explanation is required I make a special effort and create it.