Add Java code for Chapter 1.5
Merge pull request #271 from WangTaoTheTonic/master

Add Java code for Chapter 1.5