Replace first character of string

Thank you very much @CodeMasterX. This helped me a lot.

String nextWord = words.get((int)random(words.size()));`

But sometimes I get a StackOverFlowError at this line. What can I do to fix this?
image

it is because you called a complex function too many times. I don’t know why, but yeah.

If you have a function like

void aaa() {
   aaa();
}

(a function resulting in an infinite loop)
It will crash.