2017-02-10 | ../../ | Slides

New Things of Java8 and Less Noticed Old Features

These notes are an overview of new features of Java 8, compared to Java 6, 7, as well as less noticed old features, such as closures.

Caution: There are way too many pages on the web that you hit on a typical serach with "Java 8" and other keywords. Make sure you are reading pages specific to Java 8 and not Java 7 or older. Good heuristic: The page should not be older than 12 months.

1 Java 8

"Java 8 is a giant step forward for the Java language. … Java gets a new closure syntax, method-references, and default methods on interfaces. It manages to add many of the features of functional languages … ."

  1. http://www.oracle.com/technetwork/java/javase/8-whats-new-2157071.html
  2. Lambda Expressions (Closures)
  3. Concurrency in Java
  4. Event Driven Programming
  5. Sequential Streams
  6. Parallel Streams
  7. Map Reduce
  8. Futures and Callables
  9. Observer Pattern
  10. Miscellaneous
    1. Improved Security
    2. Delegates
    3. Anonymous Classes
    4. Interfaces with Methods

1.1 GUI

1.2 Java 8 on Android

  1. Jack + Jill on Android

2 Java 9

3 Kotlin

  1. Kotlin is a "modern version" of Java.
  2. https://en.wikipedia.org/wiki/Kotlin_(programming_language)
  3. https://kotlinlang.org/ "100% interoperable with Java™; Statically typed programming language for the JVM, Android and the browser" Works with IntelliJ IDEA.

4 Scala

  1. Scala is a "modern version" of Java.
    1. Elimination of "boiler plate" code: setters, getters, constructors auto generated.
    2. FOSS Project https://projectlombok.org/ does that for Java, by manipulating the ASTs.
    3. Syntax is substantially different.
    4. Most of Java 8 and Java 9 features are already in Scala.
    5. Design of Scala started in 2001.
  2. Type inference is an integral part of Scala.
  3. Has functional programming features also.
  4. ../Scala

5 References

  1. Future of Java 8 Language Feature Support on Android, March 14, 2017. googleblog, Hacker News Recommended Reading.
  2. Oracle.com, Java Essentials Tutorial, https://docs.oracle.com/javase/tutorial/essential/TOC.html. This is the recommended tutorial. Reference.
  3. http://developer.android.com/preview/j8-jack.html Java 8 Language Features as described at developer.android.com.
  4. http://lambdafaq.com Maurice Naftalin's Lambda and friends FAQ. Includes streams, etc. 2015 Reference.
  5. David Svoboda, https://insights.sei.cmu.edu/sei_blog/2015/10/is-java-more-secure-than-c.html Is Java More Secure than C? Oct 2015.

6 End

Copyright © 2017 www.wright.edu/~pmateti 2017-02-10