unesame è un oggetto di tipo Esame
int n = Integer.parseInt(testo);