Android Studio Spinner obtenga un elemento seleccionado

Spinner spinner = (Spinner)findViewById(R.id.spinner);
String text = spinner.getSelectedItem().toString();
Jesus