The Java function interface allows you to work with functions in the same way that you work with any other data type. In this video, learn what the function interface looks like, as well as how to use it to create references to existing functions.
- [Instructor] So I mentioned previously … the functional programming treats functions … as first class citizens. … Meaning that as functional programmers, … we need to get used to treating functions … in a very similar way to other types … such as strings, integers, objects, … or any other type in Java. … Over the course of the next few videos, … we're going to take a look at how exactly to start doing this, … as well as what this means for our code … and a few other useful things that we can do with it. … So let's start off with the fact … that the concept of first class functions, … means that we can define functions as variables. … Here's what I mean by that. … If you're like most Java programmers, … it's very likely that the only way you've ever seen … to define functions is as methods of a class. … For example, if you have a person class, … as we have here, … you might have a method called getName … or setAge that interacts in some way … with the classes member variables. … So our first step into first class functions then …
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.