----- 9/04/14 ----- > Vorrei capire perche' la compilazione del codice seguente > produce il messaggio di errore: > > Error: This method must return a result of type int > > public static int fibMem (int n, int[] h) { > if (h[n] == UNKNOWN) { > if (n < 2) { > h[n] = 1; > } else { > h[n] = fibMem(n-2, h) + fibMem(n-1, h); > } > return h[n]; > } > } > > (ecc.) ----- Il motivo e' che l'esecuzione del metodo "fibMem" puo' concludersi senza che sia definito il valore da restituire. ----- * -----