• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Converting int array to string - won't recognise variable?

 
Stephanie Keeler
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone please tell me what I've done wrong? I've written a method to take an integer array from main and process it into a string. But every time I try to compile, it tells me that the variable used in the for loop 'can't be found'.



Every time I get the error message

TestRun.java:40: cannot find symbol
symbol : variable eCount
location: class TestRun
sBuff.append(theArray[eCount]);
^
1 error



eCount is what I re-named it to, in case the naming was a problem. What's going on, and what have I done? (or not done!)
 
James Tharakan
Ranch Hand
Posts: 580
Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for (int eCount=0; eCount<theArray.length; eCount++);


remove the semicolon in this statement>
 
Stephanie Keeler
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once again, I feel really stupid. Thank you very much for the help!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic