View Single Post
  #3 (permalink)  
Old 07-24-2007, 12:38 AM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
PT Admin
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,119
iTrader: (0)
HelloWorld is a jewel in the roughHelloWorld is a jewel in the roughHelloWorld is a jewel in the rough
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..

__________________
PHP Code:
System.out.println("Hello World!"); 

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote