I Search around the internet about "How can i change a TextView by setText if spinner's item is selected"

In my previous app i wrote a code that displayed a toast if a specific item on the spinner was selected
it was this

```
else if(pickuptimejava.getSelectedItem().equals(("Select Time in 24 Hour Format")))
        {
            Toast.makeText(getApplicationContext(),"Please Select pick up time" , Toast.LENGTH_SHORT).show();

```

}

it works totally well "Select Time in 24 Hours Format" if someone tries to register with that item the app will show an toast that "Select time please".

But if i do the same on my other app like

```
if(pickuptimejava.getSelectedItem().equals(("Text view 1")))
        {
            textview.setText("THis is text view 1");
}

if(pickuptimejava.getSelectedItem().equals(("Text view 2")))
        {
            textview.setText("THis is text view 2");
}

```

it never changes the text. But in my first app it somehow recogonized the "Item" and it didn't let anyone pass without selecting the time. What do i do?