The first implication of first-class functions is that you can assign them like variables. Learn what this looks like in Java and how you can use it in your code.
So now that we've spent a good bit … of time learning about Java's function interfaces … and how they allow us to assign functions to variables. … Let's take a look at a few things that just the simple shift … in mindset alone allows us to do. … One thing that functional interfaces … allow us to do is assign the definition … of a function dynamically at runtime. … So to illustrate this let's think about … a real world example. … Let's say that we're writing a program that loads data … from a server, let's say that it loads data about a person … or something like that. … The only problem is that this process takes a long time … and during development or while running tests, … it can really slow us down to have to wait … for our program to load this data every time. … The good news is that using the concept … of functions as data that we've been learning about … in the past few videos. … We can dynamically change the definition … of the function that loads our data based … on the environment it's running in. …
Skill Level Advanced
Java Design Patterns: Structuralwith Bethan Palmer1h 38m Intermediate
1. Introduction to Functional Programming
2. First-Class Functions
3. Working with Streams in Java
4. Advanced Concepts
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.