Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Lambda Expressions -> Java
Rating: 4.4 out of 5(679 ratings)
18,391 students

Lambda Expressions -> Java

Learn Lambda Expression, Functional Programming, Functional Interface, Predefined Functional Interfaces
Last updated 11/2022
English

What you'll learn

  • Lambda Expressions
  • Functional Programming
  • Functional Interface
  • Predefined Functional Interfaces

Course content

3 sections20 lectures1h 31m total length
  • Functional Interface - Part 14:10

    Identify a functional interface as an interface with one abstract method, and distinguish abstract from non-abstract methods, noting the optional functional interface annotation and its checks.

  • Functional Interface - Part 22:40

    Explore Java functional interfaces and their single abstract method definitions, including callable and comparable, and learn how lambda expressions enable functional programming across Java versions.

  • Lambda Expression Introduction4:32

    Explore lambda expressions as anonymous, nameless functions, compare them with named methods that add two numbers, and learn the syntax, optional parameters, and converting methods to lambdas in Java 8.

  • Lambda Expression Rules2:45

    Follow Java lambda expression rules: curly braces optional for single-line expressions, mandatory for multi-line or when using a return keyword, semicolon required; lambda expressions require a functional interface.

  • Quiz: Lambda Expression
  • Hello World - Lambda Way5:17

    Learn how lambda expressions replace verbose interface implementations in Java 8, using the HelloInterface1 example to print hello with an anonymous function.

  • Debugging Lambda Expression3:24

    Debug a lambda expression in Java by tracing its flow from main to addTwoNumbers and into the anonymous lambda implementing sumOfTwoNumbers. The lambda prints inputs and returns their sum, 300.

  • Method Reference :: Double Colon7:51

    Explore method references with the double colon ::, showing how static and non-static methods can be referenced as an alternative to lambda expressions.

  • Quiz: Method Reference
  • ForEach Loop2:39

    Explore the for-each style in Java 8 to iterate and print a list of integers, comparing it with the traditional for loop for concise code.

  • Default Method In Interface9:44

    Learn how default methods in interfaces provide a body that implementing classes inherit, preventing compilation errors when adding new methods, with Java 8 streams as an example.

  • Static Method In Interface4:47

    Explore how static methods in interfaces provide reusable utility functionality in Java 8 and later, with bodies, accessed via the interface name, and not overridable by implementing classes.

  • Functional Interface Part 33:11

    Explore how to identify a functional interface in Java by examining abstract, default, and static methods, and how the Object class methods like equals affect the classification.

  • Functional Interface
  • Default/Static Method In Interface
  • Predefined Functional Interface - Function Part 17:34

    Explore Java 8's predefined functional interface Function, which takes one input and returns one output, using apply, with examples like currency conversion and square calculations.

  • Predefined Functional Interface - Function Part 2 (andThen & compose)5:33

    Demonstrate chaining functions with andThen and compose on the predefined functional interface Function, showing input flowing through function1 and function2 to produce uppercased and appended results.

  • Predefined Functional Interface - Predicate3:21

    Demonstrate Java 8's predefined functional interface predicate, which takes an input and returns true or false. See an example checking transaction amounts above 10000, illustrating its use over custom logic.

  • Predefined Functional Interface - Supplier3:18

    Explore how the supplier predefined functional interface in Java 8 handles no-input value generation, allowing you to return an INR rate with supplier.get rather than a custom method.

  • Predefined Functional Interface - Consumer3:51

    Explore the predefined functional interface consumer in Java 8 onwards, which accepts a single input and returns nothing, demonstrated via consumer.accept and simple actions.

Requirements

  • Enthusiasm to fast forward your Java knowledge
  • Basics of Java programming language.

Description

  • Do you want to learn Functional Programming in Java

  • Do you want to learn Lambda Expressions in Java 8?

  • Do you want to make a Great impression on your Code Reviewer/Manager/Lead ?

  • Do you want to perform well in Java Interview?

  • Do you want to reuse predefined Functional Interfaces

This is the right course for you !!


                                                               What are you waiting for?

Who this course is for:

  • Students/Developers with basic Java programming language
  • Java Developers who want to make a Great impression on Code Reviewer/Manager/Lead by using new Java Features.
  • Students/Developers who want to fast forward their Java knowledge
  • Anyone who wants to perform well in Java Interview.