Thanx
rpgfan3233
Yes, that's where the problem starts, it throws me exception if I changed it back to array.length
But, array.length should be the same with s.size() though because I created all of them within this for loop:
PHP Code:
StringTokenizer st = new StringTokenizer(line.trim(), " ");
int cnt = 0;
int length = 0;
while (st.hasMoreTokens()) {
String num = st.nextToken();
s.push(num);
q.enqueue(num);
v.add(num);
array[cnt] = num;
ll.add(num);
cnt++;
length++;
}
I edited this already and all works perfectly fine with the length counter lol... logic works correctly, but still wondering why isn't that the same thing..
