ben istaharov wrote:what is wrong with this?
for (int i = 0 ; i < madrid.length; i++ )
madrid[i] = BasicIO.ReadInteger();
Assuming BasicIO.ReadInteger() returns an int or Integer there is nothing wrong with that code per se.
The error is complaining about an unhandled exception. I don't know the BasicIO class but I would guess its ReadInteger method is decalred to throw an IOException, which is a checked exception, whch means you either have to put the call to ReadInteger in a try/catch statement or declare the main method to throw an IOException.