Thinking In Java sample code