Tuesday 11 February 2014

Arrays

So I realised that I should have a String array that includes everything inside the file that I'm reading in, and then have another array that will go through each line to determine if it's an integer, dobule, or string. Array size is determined by what number is on the first line (the number was inputted by the user beforehand). And when I run this I will get an out of bounds exception because that number is out of bounds, since it's outside of the loop. I don't know what  I'm supposed to do with that catch statement yet (as in make it disappear) since only the second line of the text is showing up.
Ex, this is what's inside the text file:
3
line one --> (but only this line here is prited)
line two
line three


No comments:

Post a Comment