Practicing Java techniques