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="" />
2.定义方法
传入一个参数 n 并将自定义函数式接口MyFun 也作为参数
3.在定义的方法中调用该函数式的getValue()方法 传入一个参数 n
4.main方法调用 对100 做加减乘除
(可以理解为Lambda表达式是对函数式接口的具体实现)
结果
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhwAAAC/CAYAAAC16QUVAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAABhpSURBVHhe7d3hj+PGecfx/XvkV3XRF3eoL1efDWVzttH47L3YtSHX3hY1kgJdtIGKvFgbARyguIApahdF0AItIOSAoq0TN+gb7R/H8hnyoYajZ0iOVrOitN8XH9ydNBoNyZnhTyNSd/bH3/uT8iRdfFI++vm/lo9+8R+mT//vSevdr56Uj9406piAh+9/Wf5m/bK8fv+x+TyA4/Lqq6+Wf/CHfwTcO5MJHMWvflW+88N3zeeSSdj4xb9vhQyfHzjEB79+vVPH59+sy5ubmy3rb37SKXcbDx/9pPx6Xb/Pev1N+fmj7VBB4ABOC4ED99WZdH4AAICcTvcrFQAAMBkEDgAAkB2BAwAAZEfgAAAA2RE4AABAdgQOAACQXXLg+PTzv05i1QEAAO4XAgcAAMgu61cqBA4AACBGB45w5WKIviasRzx89Ly8frku15Gf7Naf/F6//LJ8Zvzct7qLnx8HAAC3d9DA8ZuXL8vffPF86/lnX7ysg8NA4FB1QLH/L5IU2q6vfzxcz9MfPivf+P7TrcflMXkufBwAgPssKXBYj1vGBo6vv5D/mKwbFOrnXpbXX3wz6cDxxvnT8sNP/7ITOuTv4WMAAGCHwPHaZ3/Tyy87GDiqE7t8LeKvcjz8cRM0mj/ffe3ClTXLNAEjFjj8/41V+HXoKopbSale+1ev/bhTdkzY8UPHm4QNAACiDh44XHhowsLW481JPwwYElL8VQgrcNSPba4R6dTt/st3K6CMX+FQGjr+7NO/cKHDKgMAwH13+MDR/F1WH2Ihww8P8XARPFa9XlcrfO59XPnti1Z3CRwSMiRssLoBAEDcwQOH+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uTSJwaIiI6dyp4q2EbJUzfpUUAAAc3tEFDiGhw78dVu9S4asUAACmaTLXcAAAgNNF4AAAANkROAAAQHYEDgAAkB2BAwAAZHf22+9+X1qsYBFjVQwAAKAIHAAAIDsCBwAAyI5rOAAAQHbRFQ71j//0z2bI8FkVAwAAqN7AIWFC/+xjVQwAAKAGVziEFTJ8VsUAAACKwAEAALIjcAAAgOzMu1TGhAyfVTEAAIAicAAAgOwmFThms3m5KFblar0u16tlOZ/N7HLzRblsyt3c3DjrVVEuF/NblQUAAHlEr+GwgkWMVXGK2bwOGhoI6lBgB47ZbFEWXngIFYvNa1LKAgCAfCbxS6OLog4F6/WqXC6WLiTEAsd8WQeT1XLReX6+KOo6isVOZQEAQD6TCByzKmSsqpO/hAJdlRgKHOHqRPs6I3CMKQsAAPKZRODwDQWO2bwKJ/L8elUWzcrFfF69ZlU/tpxvXpNSFgAA5HN0gcOVqYKEhAZZvVByIejCCBApZQEAQB7HGThmc3fnSSdEuOs/jLtUEsoCAIA8ju8rleZ5CQ71xaDdO1xid6kMlQUAAPkcXeDQO1pWy+4KRXvnife6lLIAACCfowoc7uuRyAWf7evWRbmoXpdS1n8OAADs3xGvcNR3nejj/Sscw2UBAEA+kwgcsyYAxPjBYKhs5xqOhLIAACCfowscrrz7LY3unSer6G2x48sCAIA8JveVCgAAOD1b/3mbFSiGWBUDAACo6P8WK6xwYbEqBgAAUAQOAACQHddwAACA7KIrHFawiLEqBgAAUAQOAACQHYEDAABkR+AAAADZETgAAEB2BA4AAJAdgQMAAGRnBo5vf0fgAAAA+7MVOL793f+WP//qF2awiLEqBgAAUPzSKAAAyI7AAQAAsiNwAACA7AgcAAAgOwIHAADIjsABAACyI3AAAIDsCBwAACA7AgcAAMiOwAEAADJ7pfx/rixBNaSVGAAAAAAASUVORK5CYII=" alt="" />
package com.wf.zhang.java8.function;
@FunctionalInterface
public interface MyFun {
public Integer getValue(Integer num);
}
MyFun
package com.wf.zhang.java8.function;
public class Test {
public static void main(String[] args) {
Integer num1 = operation(100, t -> t * t);
Integer num2 = operation(100, t -> t - 10);
Integer num3 = operation(100, t -> t / 5);
Integer num4 = operation(100, t -> t + 88);
System.out.println(num1);
System.out.println(num2);
System.out.println(num3);
System.out.println(num4);
}
//定义方法 将自定义函数接口作为参数
public static Integer operation(int n, MyFun mf) {
return mf.getValue(n);
}
}
Test
- 乐字节-Java8新特性之函数式接口
上一篇小乐带大家学过 Java8新特性-Lambda表达式,那什么时候可以使用Lambda?通常Lambda表达式是用在函数式接口上使用的.从Java8开始引入了函数式接口,其说明比较简单:函数式接口 ...
- Java8 Lambda表达式、函数式接口和方法引用
目录 Java8 Lambda表达式和函数式接口 Lambda表达式 Lambda的使用 函数式接口FunctionalInterface Java内置四大核心函数式接口 方法引用 构造器引用 Jav ...
- java8学习之深入函数式接口与方法引用
函数式接口: 函数式接口[FunctionalInterface]是整个Lambda表达式的一个根源,换句话来说java8中的Lambda表达式要想彻底掌握,前提是要彻底理解好函数式接口,所以这次继续 ...
- Java8内置的函数式接口
JDK 1.8 API 包含了很多内置的函数式接口.其中就包括我们在老版本中经常见到的 Comparator 和 Runnable,Java 8 为他们都添加了 @FunctionalInterfac ...
- java8 Lambda 表达式和函数式接口快速理解
前言 接上篇文章 java8 新特性 由于上篇过于庞大,使得重点不够清晰,本篇单独拿出 java8 的 Lambda 表达式和函数式接口说明. Lambda 表达式 lambda 表达式其实就是使用了 ...
- Java8一Lambda与函数式接口
关于Lambda表示在工作学习中会经常用到,但并没有全面的去了解.在这里做一个较为详细的记录供以后学习查阅.主要参考Java 8 Lambda 表达式 引言 Java8之前,我们在使用Runnale创 ...
- java8学习之BiFunction函数式接口实例演示&Predicate函数式接口详解
BiFunction函数式接口: 在上次中已经对BiFunction接口进行了初步的认识,这里对它进一步学习,这里打算新建一个Person实体,然后新建若干个Person的实例存放在集合中,最后再根据 ...
- Java8 内置的函数式接口
1.Java8 内置的四大核心函数式接口 (1)Consumer<T> : 消费型接口 void accept(T t); (2)Supplier<T> : 供 ...
- Java8的新特性--函数式接口
目录 函数式接口 什么是函数式接口 函数式接口的使用 Java8内置的四大核心函数式接口 一.Consumer:消费型接口(void accept(T t)) 二.Supplier:供给型接口(T g ...
随机推荐
- IPFS学习-DNS链接
DNSLink 什么是DNS链接 DNS链接使用DNS TXT记录映射域名(如ipfs.io)到一个IPFS地址.因为你可以编辑自己的DNS记录,可以使他们总是指向最新版本的IPFS中的对象(如果修改 ...
- SpringCloud找不到@HystrixCommand标签
版本声明: SpringCloud:Greenwich.SR4 SpringBoot:2.1.9.RELEASE 解决方案: 添加坐标 <dependency> <groupId&g ...
- 在 ASP.NET Core 中启用跨域请求(CORS)
本文介绍如何在 ASP.NET Core 的应用程序中启用 CORS. 浏览器安全可以防止网页向其他域发送请求,而不是为网页提供服务. 此限制称为相同源策略. 同一源策略可防止恶意站点读取另一个站点中 ...
- Java学习 1.1——(JVM介绍)Java为什么能够跨平台?
首先介绍一下Java的各个层级,先放一张图: 硬件,操作系统和操作系统接口:这三级不说大家都知道,操作系统有很多种,比如Windows,Linux.Windows又分为win7,win10,win x ...
- 龙芯(mips64)电脑安装NodeJS
背景 龙芯是国产的cpu,采用是mips架构,就类似大家熟知的x86.arm. 最近在一台龙芯电脑(系统是中兴新支点,Linux)上调试前端应用(electron),于是就需要安装NodeJS. 但是 ...
- Geoserver安装
准备内容 安装环境:win10*64位专业版 安装文件:geoserver-2.15.2 安装步骤 安装JDK 1.安装GeoServer是基于Java的环境,所以需要先装Jdk环境. 2.前往官网下 ...
- SCTF2019 Crypto-warmup writeup
题外话 其实这道题在比赛过程中并没有解出来,思路完全想偏导致无解就放弃了,后来研究了大佬的writeup大半天才看懂... 正文 nc获取题目信息,返回一段明文和密文,要求输入一段明文和密文. 题目源 ...
- WebSessionStore: Could not obtain reference to HttpContext
IBatis.net在多线程中报错“WebSessionStore: Could not obtain reference to HttpContext” 分析: 因为ibatis的ISqlMapSe ...
- 51-overlay 是如何隔离的?
不同的 overlay 网络是相互隔离的.我们创建第二个 overlay 网络 ov_net2 并运行容器 bbox3. bbox3 分配到的 IP 是 10.0.1.2,尝试 ping bbox1( ...
- 默认值操作符(Freemarker的空值处理)
默认值操作符: 使用形式例如: userName!default_expr 或 userName! 或 (userName)!default_expr 或 (userName)! 这个操作符允许你为可 ...