Thread: Matrices
View Single Post
Old Apr 15th, 2007, 12:40 PM   #3
paulchwd
Hobbyist Programmer
 
paulchwd's Avatar
 
Join Date: Mar 2005
Posts: 139
Rep Power: 4 paulchwd is on a distinguished road
Exclamation

im am using stringtokenizer to tokenize the user input (first row of data), but where do i put the while(st.hasMoreTokens()) loop?, here is my code:


StringTokenizer st = new StringTokenizer(data);
  
      
		     for (int i=0; i<=row-1; i++ )
		     {
				System.out.println("I= " + i);

			    for(int j=0; j<=col-1; i++)
			    {

  				  System.out.println("J= " + j);
				  addArray1[i][j]=Integer.parseInt(st.nextToken());
			   			     
			    }
    		  
		    }



thnx x 10
paulchwd is offline   Reply With Quote