Putting Java functions in correct place
Fixing tabs in Java example
Fixing incorrect comparison in Java KMeans