
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.
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.
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 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 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 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.
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.
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.
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 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.
Demonstrate using an optional to eliminate null checks by refactoring address handling, showing concise, clean code with optional versus traditional null checks.
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 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.
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.
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