/java8-examples

Java8高级编程示例。

Primary LanguageJava

Java8高级编程示例

参考《Java8实战》改写的,示例中有详细注释,示例持续更新中。

主要内容如下:

  • Chapter 1: Java 8: why should you care?
  • Chapter 2: Passing code with behavior parameterization
  • Chapter 3: Lambda expressions
  • Chapter 4: Working with Streams
  • Chapter 5: Processing data with streams
  • Chapter 6: Collecting data with streams
  • Chapter 7: Parallel data processing and performance
  • Chapter 8: Refactoring, testing, debugging
  • Chapter 9: Default methods
  • Chapter 10: Using Optional as a better alternative to null
  • Chapter 11: CompletableFuture: composable asynchronous programming
  • Chapter 12: New Date and Time API
  • Chapter 13: Thinking functionally
  • Chapter 14: Functional programming techniques
  • Chapter 15: Blending OOP and FP: comparing Java 8 and Scala
  • Chapter 16: Conclusions and "where next" for Java
  • Appendix A: Miscellaneous language updates
  • Appendix B: Miscellaneous library updates
  • Appendix C: Performing multiple operations in parallel on a Stream
  • Appendix D: Lambdas and JVM bytecode

JDK8安装

$ java -version

openjdk version "1.8.0_25" OpenJDK Runtime Environment (build 1.8.0_25-b18) OpenJDK 64-Bit Server VM (build 25.25-b02, mixed mode)

编译和运行示例

$ mvn compile

$ cd target/classes

$ java lambdasinaction/chap1/FilteringApples

开发人员

WeChat: wgybzb

QQ: 1010437118

E-mail: wgybzb@sina.cn