I've looked over a few other posts on the topic, but I don't understand Java well enough to understand those questions or their answers. Basically, I'm trying to shrink a String array, removing all values that don't match a given length. For instance, if the String is "pen", "pencil", "note", "paper", "desk", "object", "stuff" and I'm only looking for Strings with length 4, I want to have an array that only has "note" and "desk". I thought that the 'remove()' method could help me, but I must be implementing it wrong. This is what I have:
String[]wordArray = playerWordArray;
for (int i = 0; i < wordArray.length; i++) {
if (wordArray[i].length() != length) {
wordArray.remove();
}