Different code kata programmed with Java