Hi I wrote a java code to find longest word made of other words. My logic is to read the list of words from the text file and add each word into an array (In the text the wo
A few tips:
First, always include the full stack trace when you are asking for debugging help. It should point to the exact line number the issue is happening on.
Second, your issue is likely in your most inner loop for(int j1=0;j1i1 in addition to j1 this will cause i1 to eventually go beyond the size of String s
Finally, you should consider using the String.contains() method for Strings or even a Regular Expression.