Suppose you have a String[]
that has been created after a .split()
which then causes you to have a bunch of empty strings in there i.e.
myArray['','hello','thetimes','economist','','','hi']
Is there a way to remove them from the String[]
without having to loop round, detecting if string is empty then adding to new array?