上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 21 下一页
摘要: public class StreamDemo02 { public static void main(String[] args) { //创建一个集合 ArrayList<String> list = new ArrayList<>(); list.add("赵敏"); list.add("张无 阅读全文
posted @ 2020-06-19 17:10 硬盘红了 阅读(304) 评论(0) 推荐(0) 编辑
摘要: public class StreamDemo { public static void main(String[] args) { //创建一个集合 ArrayList<String> list = new ArrayList<>(); list.add("赵敏"); list.add("张无忌" 阅读全文
posted @ 2020-06-19 15:31 硬盘红了 阅读(635) 评论(0) 推荐(0) 编辑
摘要: 不使用Stream流完成上述操作代码: public class StreamDemo { public static void main(String[] args) { //创建一个集合,存储多个字符串元素 ArrayList<String> list = new ArrayList<>(); 阅读全文
posted @ 2020-06-19 14:52 硬盘红了 阅读(137) 评论(0) 推荐(0) 编辑
摘要: public class FunctionTest { public static void main(String[] args) { String s = "林青霞,30"; convert(s, s1 -> s1.split(",")[1], s1 -> Integer.parseInt(s1 阅读全文
posted @ 2020-06-08 18:27 硬盘红了 阅读(128) 评论(0) 推荐(0) 编辑
摘要: public class FunctionDemo { public static void main(String[] args) { convert("100", s -> Integer.parseInt(s)); convert(100, i -> String.valueOf(i + 56 阅读全文
posted @ 2020-06-08 17:57 硬盘红了 阅读(596) 评论(0) 推荐(0) 编辑
摘要: public class PredicateTest { public static void main(String[] args) { String[] strArray = {"林青霞,30","柳岩,34","张曼玉,35","貂蝉,31","王祖贤,33"}; ArrayList<Stri 阅读全文
posted @ 2020-06-08 17:30 硬盘红了 阅读(214) 评论(0) 推荐(0) 编辑
摘要: public class PredicateDemo { public static void main(String[] args) { boolean b1 = checkString("hello", s -> s.length() > 8); System.out.println(b1); 阅读全文
posted @ 2020-06-08 15:55 硬盘红了 阅读(380) 评论(0) 推荐(0) 编辑
摘要: public class ConsumerTest { public static void main(String[] args) { String[] strArray = {"林青霞,30", "张曼玉,35", "王祖贤,40"}; printInfo(strArray, (String s 阅读全文
posted @ 2020-06-08 15:28 硬盘红了 阅读(158) 评论(0) 推荐(0) 编辑
摘要: public class ConsumerDemo { public static void main(String[] args) { operatorString("旭旭宝宝",s -> System.out.println(s)); operatorString("旭旭宝宝",s -> Sys 阅读全文
posted @ 2020-06-06 19:26 硬盘红了 阅读(536) 评论(0) 推荐(0) 编辑
摘要: public class SupplierTest { public static void main(String[] args) { //定义数组 int[] a = {10,20,33,12,99}; //调用方法获取最大值 int MaxValue = getMax(()->{ int Ma 阅读全文
posted @ 2020-06-06 18:57 硬盘红了 阅读(135) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 21 下一页