Giter VIP home page Giter VIP logo

java8study's Introduction

Java8 新特性学习

lambda1

  • 观察Java8新特性的特点和方便性,初始Java8 函数式编程、stream api等

lambda2

  • Java8 的基础语法,箭头,左右两部分的含义
  • 什么是函数式接口?
  • 一些示例

lambda3

  • lambda表达式使用练习

lambda4

  • Java8 四大核心函数式接口,防止每次用lambda表达式都要自己定义接口的麻烦

method1

  • 方法引用与构造器引用

Stream

  • 数据源转化成流,中间可以有一系列处理,产生新的流(而不是数据源)
    • Stream 不会存储数据
    • 不会改变源对象,而是返回一个持有结果的新Stream
    • 延迟执行,需要结果时才执行

stream1

  • 创建stream
  • 中间操作
  • 终止操作

stream2

  • 终止操作
    • 归约 map -> reduce
    • 收集 collect,然后可以求和,求最大最小,分组等操作

stream3

stream API小练习

parallel

并行化处理

optional类

  • 常用方法
  • 主要是为了防止空指针异常

interfacefunction

  • 类优先原则
  • 多实现时,要指定实现的是哪个接口的方法

date1

  • Java8 新事件格式
    • 主要注意,时间对象每次都是新的,有效防止多线程冲突

Annotation

  • 重复注解
  • 类型注解

java8study's People

Contributors

jerry1ee avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.