Think in Java version#4 sample code