Java learning example.