Rieccomi di nuovo qua con un altro problema Q_Q, spiego
Allora io ho un metodo makePlayers in una classe GameOfTheGoose ho un richiamo al costrutore di una altra classe player il quale può causare eccezzione, quindi se io lo chiamo in makePlayers makePlayers solleva una eccezione,quindi de compilo senza throws IOException non funziona.
Ma se metto throws IOException mi da errore in compilazione:
invece se provo try catch:GameOfTheGoose.java:11: cannot find symbol
symbol : cass IOException
location : class GameOfTheGoose
public void makePlayers()throws IOException{
^
1 error
GameOfTheGoose.java:18: cannot find symbol
symbol : cass IOException
location : class GameOfTheGoose
catch(IOException e){}
^
1 error
HEEEEEEEELP!!!![]()


Rispondi quotando

