Hey everyone, I have a quick question about some Java code.
I need to write a method that fills an array, with a few conditions.
The method I'm writing is called readArray.
There are two arrays, one called "states" and the other "capitals". I have to fill both these String arrays using ONE method. I can handle that, except I have to fill them using information from a file. The first line in the file is a state, the second is it's the capital...and so on. Do I create the arrays in the main method and pass them to readArray as parameters? Or do I create the arrays inside of the readArray?
I am completely lost with this. Can someone help? Thanks :)
Edited by loupgarou: n/a