//There will be 0.0 to 1.0% chance that the String will become "CHICKEN NUGGESTs"
public static String main(String arg){
Random rand = new Random();
int mutatePercentage = rand.nextInt(100);// if it's 0, means 0% chance. if it's 99, it means 1% chance
if(mutatePercentage==0){
return arg; // no change since % is 0
}
else if (rand.nextInt(10000) < mutatePercentage){
return mutateString(arg);
}
}
Hi there,
I found this piece of code from else where.
Where can I get the mutateString(arg) function?












