
Introduce Java 8 and its major features, including lambda expressions, functional interfaces, stream API, and the date time API, to simplify programming and boost performance.
Learn how Java 8 introduces default methods in interfaces, enabling method bodies with the default keyword and illustrating when implementing classes override or inherit these methods.
Explore how default methods in interfaces enable limited multiple inheritance in Java, reveal the diamond problem, and show how implementing the method in the class resolves ambiguity.
Explore static methods in Java 8 interfaces, compare them with default methods, and show why static interface methods cannot be overridden and must be invoked through the interface.
Explore how default methods preserve backward compatibility and enable new interface behavior, including collection and stream support, with static interface methods providing utility code.
Compare abstract classes and interfaces in Java 8, noting that abstract classes can hold state while interfaces cannot, and how default and static interface methods add functionality.
Explore Java 8 functional interfaces, defined by a single abstract method and supporting default and static methods, with optional @FunctionalInterface annotation that enforces the single-method rule and triggers compile errors.
Explore lambda expressions and anonymous functions in Java 8, and see how functional interfaces reduce boilerplate, enable passing code as a method, and bridge object‑oriented and functional styles.
Learn how lambda expressions implement a functional interface by providing an anonymous function, covering parameter lists, optional types, single or multiple statements, and braces for the body.
Explore Java 8 new features by implementing functional interfaces with lambda expressions, including a string length calculator and a math calculator, and run examples to print results.
Explore how lambda expressions and functional interfaces reduce boilerplate, enable inline implementations, and pass behavior as parameters, with examples using forEach and varied implementations for the same method.
Explore built-in functional interfaces in the java.util.function package, focusing on Consumer. See how Consumer.accept processes values (integers and strings) via lambda expressions, used with forEach and streams.
Explore the built-in predicate interface in Java 8, its test method, and how lambda expressions verify an even number or a string starts with Halo.
Explore the function interface in Java 8, implement apply with a lambda, and map a string to length and a student to marks, noting its use in the stream API.
Learn the built-in supplier functional interface in java 8 and its get method with no arguments. See a lambda-based supplier returning a random double and its use in the stream api.
Learn Java 8 new features by using the forEach method with lambda expressions to replace explicit for loops, printing elements and creating transformed lists like a squares list.
Explore how forEach walks through a collection in Java 8, using the default method on collection interfaces and a Consumer with a lambda expression across lists, maps, and sets.
Explore the Java 8 stream API introduced by Java and how streams perform bulk and sequential operations on collections without modifying the underlying data.
Explore how to create Java streams from collections, inputs, and suppliers, generate streams with lambdas, and iterate with forEach to process and print elements.
Explore intermediate operations on streams in Java 8, using lambda expressions to transform elements with map and filter and produce new streams.
Demonstrate terminal operations on streams in Java 8 by using anyMatch to short-circuit and count to determine stream size, with lambda expressions and API references.
Demonstrate chaining stream operations in Java 8 by filtering cartoon characters whose last names start with B, mapping to full names, sorting them, and printing each through forEach.
Explore parallel streams in Java 8, showing how stream operations can run concurrently for large collections and how output order compares with sequential streams, highlighting potential performance gains.
Explore Java 8 method references and how they reuse existing methods to simplify code. Examine static, instance, arbitrary object, and constructor references and their use with lambda expressions.
Demonstrate creating a calculator interface and using lambdas and method references to implement its calculate method, transitioning from lambda expressions to static method references for operations like addition and multiplication.
Explore static and instance method references in Java 8, using method reference operator with a class name for static methods and an object for instance methods in streams and predicates.
Learn arbitrary method references in Java 8, using ClassName::methodName to invoke an instance method on all objects in a collection, as shown with the Animal class.
Explore constructor references in Java 8 and method reference operator, showing how a constructor creates objects from names and how a supplier uses it to instantiate new objects.
Explore the Java date time API introduced in Java 8, comparing the new immutable date and time classes and time zones with the old date and calendar approach.
Explore creating dates with Java 8's LocalDate class from year, month, and day, or from day of year, and parse strings with formats, without time or time zone.
Explore Java 8 LocalDate date arithmetic by adding and subtracting days, weeks, months, and years, and adjust dates using withMonth, withDayOfMonth, withYear, and withDayOfYear.
Learn to extract information from LocalDate, including day of year, day of month, month, and day of week, with demonstrations and API documentation.
Learn Java 8 LocalDate date comparisons by using isBefore, isAfter, isEqual, and isLeapYear to determine date order and leap years.
Learn the Java 8 LocalTime class, including parsing a string with a date-time format and manipulating minutes, seconds, and nanoseconds with plus and minus operations.
Explore Java 8 local date and time APIs, create local date and time instances, manipulate components with plus and set methods, and compare dates using is before and is equal.
Explore Java 8's ZonedDateTime and ZoneId to handle time zones, GMT/UTC offsets, and current times, and learn to create and manipulate zone date time objects.
Explore Java's optional container that may hold a value or be absent. See how optional reduces boilerplate null checks and helps avoid errors when values may be missing.
Explore how to create optional values in Java 8 using Optional.empty, Optional.of, and Optional.ofNullable. Understand that Optional.of(null) throws a NullPointerException, while Optional.ofNullable returns an empty optional for null.
Explore the optional class in Java 8, using isPresent, get, and ifPresent to check values, retrieve them, or perform actions when present.
Explore how orElse, orElseGet, and orElseThrow manage empty optionals with defaults or exceptions. See how the get method uses a supplier to provide values.
Learn how Java 8's Optional supports filter with a predicate to yield an empty or present optional, and map to transform the optional's value.
Demonstrate using an optional to eliminate null checks by refactoring address handling, showing concise, clean code with optional versus traditional null checks.
Explore Java 8's CompletableFuture in the concurrency API, enabling asynchronous programming with callbacks and addressing blocking and the limitations of Future and Callable.
Explains how to create CompletableFuture and also the get method
Learn to run tasks asynchronously in a separate thread with runAsync, using a lambda expression, and control synchronization with the get method versus continuing on the main thread.
Learn to run code asynchronously with supplyAsync, a CompletableFuture method that spawns a new thread using a supplier to produce a value like Hello World, retrieved by get.
Learn how to manually complete a future using the complete method, with a supplier and supplyAsync, checking isDone, and contrasting with calling get directly.
Use the thenAccept callback in CompletableFuture to perform an action on the result of an asynchronous computation without blocking the main thread, noting it does not return any value.
Explore the thenApply callback in Java 8 to transform the result of a CompletableFuture using a Function, with synchronous and asynchronous variants, illustrated by doubling a value.
Learn how to chain callbacks in Java 8 using thenApply and thenAccept to transform asynchronous results, such as converting strings to uppercase and printing them.
Combine two independent asynchronous tasks using thenCombine to apply a BiFunction that computes their average after both complete, demonstrated with suppliers returning 21 and 40.
Apply the allOf method to combine multiple futures, wait for all to complete, then perform follow-up actions after their results are ready.
Explore the CompletableFuture.anyOf method in Java 8, a static helper that completes when any given futures finish and returns the first result, as shown with string futures.
Explore how the future handles exceptions with the exceptionally method and a function interface, showing an async path and an alternate execution when a runtime exception occurs.
Explore Java 8's List.replaceAll method that transforms every list element with a unary operator, demonstrated by converting strings to uppercase using a lambda, yielding concise, readable code.
Learn how Java 8 adds List.sort to the List interface, using a comparator (lambda) to sort in place, with faster in-place sorting versus Collections.sort which copies to an array.
Update: New lectures added on Java 8 List Improvements!
---------------------------------------------------------------------------------------------------------
Update: New lectures added on Java 8 CompletableFuture
---------------------------------------------------------------------------------------------------------
Update: New lectures added on Java 8 Optional Feature!!
---------------------------------------------------------------------------------------------------------
In this course, you will learn all the new features introduced by Java 8.
Here is what you will achieve at the end of this course:
You will have a good understanding of Java 8 concepts
Be able to write code that uses Java 8 features like lambdas and streams
Be able to participate in developing real world Java projects using Java 8 features
Be able to face Java interviews with confidence
What this course covers:
It teaches you all Java 8 features like Streams, Lambdas, DateTime API, to name a few
It teaches Java 8 using Eclipse which is a powerful Java IDE
Why choose this course:
The course uses simple, easy to understand language
Code samples are provided at the end of each topic
Simple assignments for each topic
Practice tests to test the concepts learnt