nextInt è un metodo, non un attributo. Quindi viene chiamato così
codice:
tastiera.nextInt();