Examples from java 8th ed.