Maybe it has something to do with:
PHP Code:
for (int i = 0; i < array.length; i++) {
vs
PHP Code:
for (int i = 0; i < s.size()-1; i++) {
? Without knowing what q, s, array, etc. are, it is somewhat difficult to help you. Please post a bit more code, so that we might better assist you.
Thanks,
rpgfan3233