Reading a txt file and storing them in a Java Array
I am in the middle of a coding experiment, and generally everything has went smoothly until this very last part. I really have no idea where to even begin with this sub question, and it's really stressing me out like you cant believe. I've tried way after way only getting errors. And it's a real downer because everything before it had pretty much after it went well. I've written nearly 500 lines of code everything working properly, and just as you begin nearing the end, happy that everything went more or less smoothly throughout (although there were some errors which had to be worked around like with any series of codes, but we are all human after all) you get stopped dead set in your tracks of progress. This would be ok if time was a luxury you have, but unfortunately, at this stage it's not really something in abundance. For this little sub problem, It's just I have no idea where to begin, and even after reading some tutorials, I am still having some major trouble with getting it to work right.
Basically, I have to read this txt file, ( link to the text file)
and put the data into 5 arrays (without a scanner)
The Name has to go into the Name array, the N/Y has to go into the Before array, the next column of numbers have to go into into the timespent array, the next column has to go into the assistants array and the last row has to go into the risk array.
So we have 5 Arrays
String Name  = new String [20)
Char Before  = new Char 
Int timeSpent  = new Int 
Int Assistants  = new int 
Double Risk  = new Double 
So these are the 5 arrays that i've made, but what I am having trouble with is actually reading the text file and writing it so that the appropriate column goes into the appropriate array.
So any help with getting my code together and those values into there proper respective arrays so that I can continue would be very, very greatly appreciated. Please help, I am about to pull my hair out lol. After writing so much code, looking at the screen for so long and getting so much accomplished relatively hassle free, and just as your nearing the then hitting a road block so huge you don't even know where to begin and ontop of that time being a luxury you don't have and ontop of that, the remaining little sub problems (which after reading I know for sure how to do, as i've done such problems before) all depend on this problems output so I cant even move on if I wanted to, it's all just really really getting to me. I feel like I am about to explode. Ahh, but what can you do but be patient and ask for help when you need it. Anyhow, any help on this would be much appreciated. Thanks alot.
Re: Reading a txt file and storing them in a Java Array
Can you describe how the data in the file is supposed to be separated into the parts that go into the arrays?
Does each line have 5 pieces of data, one for each array
or is each piece of data on a separate line?
Can you post the code that is trying to read lines from the file and shows how you are getting the data for each array? Be sure to use code tags with the code.