How do i stop j from being one higher than the valid index of the string? - index of seins jpg pondérale teen girl
import java.io. *; 
 Public class HuffmanTree 
 ( 
 public static void main (String [] args) throws java.io.IOException ( 
 / / Declare Array 
 String [] huffmanData = new String [37]; 
 (Data = new FileReader FileReader "tree.data"); 
 Br = new BufferedReader (data); 
 int count = 0; 
 String s; 
 while ((n = br.readLine ())! = null) ( 
 huffmanData [count] = s; 
 count + +; 
 ) 
 / / Create the root node 
 Node rootNode = new Node (null, null); 
 int i; 
 for (i = 0, i \\ \\ \\ \\ \\ \\ \\ \\ u0026lt, 36, i + +) ( 
 System.out.println (huffmanData [i]); 
 / / Create another node 
 intj; 
 for (j = 2 j \\ \\ \\ \\ \\ \\ \\ \\ u0026lt; huffmanData [i]. length () j + +) ( 
 String digits = huffmanData [i]. Substring (j, 1), / / this is where the exception is thrown outside the boundaries, 
 System.out.println (numbers); 
 ) 
 ) 
 ) 
 )
 
No comments:
Post a Comment