• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
仅供参考
博客园    首页    新随笔    联系   管理    订阅  订阅
2020年12月19日
生产与消费
摘要: public static void main(String[] args) { String s = s(() → { return "是"; }); System.out.println(s); } public static String s(Supplier<String> pp){ ret 阅读全文
posted @ 2020-12-19 20:37 七0 阅读(64) 评论(0) 推荐(0)
FunctionalInterface注解与Lambda函数的特性
摘要: @FunctionalInterface注解 与@Override注解作用类似,Java 8中专门为函数式接口引入的一个新注解@FunctionalInterface,该注解主要定义在接口上。一旦在接口上使用该注解,编译期将会强制检查该接口是不是一个函数式接口,该接口中是不是有且仅有一个抽象方法,如 阅读全文
posted @ 2020-12-19 20:35 七0 阅读(170) 评论(0) 推荐(0)
Stream流的过滤器操作以及遍历操作
摘要: public static void main(String[] args) { // 构建一个集合 List list = new ArrayList(); list.add("abc123"); list.add("aaa22"); list.add("bcd125"); list.add("a 阅读全文
posted @ 2020-12-19 20:34 七0 阅读(491) 评论(0) 推荐(0)
序列化与反序列化
摘要: // 1.定义多个对象,存储在集合中 ArrayList list = new ArrayList<>(); list.add(new Student("小孙",30)); list.add(new Student("小王",20)); list.add(new Student("小赵",40)); 阅读全文
posted @ 2020-12-19 09:29 七0 阅读(81) 评论(0) 推荐(0)
ObjectInputStream对象流
摘要: //1.创建ObjectOutputStream流对象,构造方法中传递指定的字节输出流。 ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("day30_IO\student.txt")); //2.使用Obje 阅读全文
posted @ 2020-12-19 09:28 七0 阅读(260) 评论(0) 推荐(0)
文件类型转换的基本格式
摘要: //1.1 使用指定GBK编码的转换流,读取文本文件。InputStreamReader final InputStreamReader isr = new InputStreamReader(new FileInputStream("day30_IO\GBK.txt"), "GBK"); //1. 阅读全文
posted @ 2020-12-19 09:22 七0 阅读(167) 评论(0) 推荐(0)
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3