Se l'errore è nel metodo

stampa()

è quel codice che ci dovresti far vedere ...