Change the origin java example version to Java 8 lambda version