摘要:
Stream流 /* 题目要求:筛选出 1.Id必须是偶数 2.年龄>23 3.用户名转大写 4.用户名字母倒序 5.只输入一个用户 * * * */ public class Test { public static void main(String[] args) { User u1 = new 阅读全文
摘要:
四大函数式接口 新时代程序员:lambda表达式,链式编程,函数式接口,stream流式计算 函数式接口:只有一个抽象方法的接口,而@FunctionalInterface注解不是必须的 Function Function 函数型接口,一个入参,一个出参 /* * Function 函数型接口,一个 阅读全文
摘要:
ReadWriterLock 读锁,共享锁, 写锁,独占锁,排他锁 public class Test { public static void main(String[] args) { MyCache myCache = new MyCache(); for (int i = 1; i <= 5 阅读全文