Fixed Java example.