title: Comparing the characters of a selected item on a spinner with a set of characters
body: <p>I'm trying to compare the characters of a selected item on a spinner with another character. I'm defending my final year project tomorrow 29/07/2016 and I'm still not through with my coding.</p>
  
  <pre><code> public void addListenerToSelect_PHS(){
       Select_DayOfTheWeek = (Spinner)
           findViewById(R.id.DayOfTheWeek);
       Select_DayOfTheWeek.setOnItemSelectedListener(newAdapterView.OnItemSelectedListener() {
       @Override
          public void onItemSelected(AdapterView&lt;?&gt; parent, View view, int position, long id) {
              String itemSelectedInSpinner = parent.getSelectedItem().toString();
              if (itemSelectedInSpinner .equals("Computer Science")){
                  Toast.makeText(ActivityMain.this, "You are from Computer Science", Toast.LENGTH_SHORT).show();
                  Select_DayOfTheWeek = (Spinner)
                          findViewById(R.id.DayOfTheWeek);
                  ArrayAdapter&lt;CharSequence&gt; Select_DayOfTheWeekAdapter =
                          ArrayAdapter.createFromResource(getApplicationContext(),R.array.ComptWeek,
                                  android.R.layout.simple_spinner_item);
                  Select_DayOfTheWeekAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
                  Select_DayOfTheWeek.setAdapter(Select_DayOfTheWeekAdapter);
              }
  
          }
  
          @Override
          public void onNothingSelected(AdapterView&lt;?&gt; parent) {
  
          }
      });
  }
  </code></pre>