Java generated histogram