Results 1 to 4 of 4
- 09-11-2011, 08:02 AM #1
Member
- Join Date
- Sep 2011
- Posts
- 2
- Rep Power
- 0
- 09-11-2011, 08:08 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
- 09-11-2011, 08:21 AM #3
Member
- Join Date
- Sep 2011
- Posts
- 2
- Rep Power
- 0
Re: Error Exception in thread "main" java.lang.StringIndexOutOfBoundsException
Please Check this code
findIf = lineOfFile.indexOf("if");
findWhile = lineOfFile.indexOf("while");
findElse = lineOfFile.indexOf("else");
//For if and While
for(i=0 ; i<2; i++)
{
if(i==1)
findIf = findWhile;
//If 'if' is found, check to see if 'if' is a an if statement
if (findIf != -1) {
precedingChar = lineOfFile.charAt(findIf - 1);
- 09-11-2011, 09:15 AM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
Exception in thread "main" java.lang.Error ...
By mossy in forum New To JavaReplies: 7Last Post: 10-31-2010, 09:53 AM -
Question about error "Exception in thread "main" java.lang.NoSuchMethodError: main
By ferdzz in forum New To JavaReplies: 5Last Post: 06-22-2010, 03:51 PM -
Runtime error "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
By shantimudigonda in forum New To JavaReplies: 1Last Post: 11-20-2009, 07:58 PM -
ERROR: Exception in thread "main" java.lang.NoSuchMethodError: main
By barney in forum New To JavaReplies: 1Last Post: 08-07-2007, 07:10 AM -
Error: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
By romina in forum New To JavaReplies: 1Last Post: 07-25-2007, 10:55 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks