How to sort words alphabetically from a String?

There aren’t any variables named exactly word nor x in your posted code!

Also, you’re reassigning field lines w/ another String[] array inside draw():
lines = split(message, " ");

Obviously after that, the previously sort() String[] array from setup() is gone!

However, all of this is already beyond what you had specifically requested in this topic here.

I believe this is all being debated in your previous topic below:

2 Likes