title: Use switch case with array
body: <p>is it possible to use array in switch statment in this code?
  because I try several times and I could not, also is there is another way to declare the BloodType then assign multiple String values to it without this array? e.g.(enum Or ArrayList ?) can I use them in this case?</p>
  
  <pre><code>private String []BloodType  = new String[8];
  public String[] getBloodType() {
          return BloodType;
      }
  
      public void setBloodType(String[] BloodType) {
          this.BloodType = BloodType;
      }
          private void BloodType()
          {
              BloodType[0]="A+";
              BloodType[1]="A-";
              BloodType[2]="B+";
              BloodType[3]="B-";
              BloodType[4]="O+";
              BloodType[5]="O-";
              BloodType[6]="AB+";
              BloodType[7]="AB-";
          }
  public void BloodInfomation () // use BloodType here as Array
      {
  
              switch (BloodType) {
                  case "A+":
                      BloodCode=1;
                      System.out.println("Blood Type A+ &amp; Blood Code is : " + BloodCode + "No of Bags avaliable"
                              + s.checkStockType.equals("A+"));
                      break;
                  case "A-":
                      BloodCode=2;
                      System.out.println("Blood Type A- &amp; Blood Code is : " + BloodCode + "No of Bags avaliable" 
                              + s.checkStockType.equals("A-"));
                      break;
                  case "B+":
                      BloodCode=3;
                      System.out.println("Blood Type B+ &amp; Blood Code is : " + BloodCode + "No of Bags avaliable" 
                              + s.checkStockType.equals("B+"));
                      break;
                  case "B-":
                      BloodCode=4;
                      System.out.println("Blood Type B- &amp; Blood Code is : " + BloodCode + "No of Bags avaliable" 
                              + s.checkStockType.equals("B-"));
                      break;
                  case "O+":
                      BloodCode=5;
                      System.out.println("Blood Type O+ &amp; Blood Code is : " + BloodCode + "No of Bags avaliable" 
                              + s.checkStockType.equals("O+"));
                      break;
                  case "O-":
                      BloodCode=6;
                      System.out.println("Blood Type O- &amp; Blood Code is : " + BloodCode + "No of Bags avaliable" 
                              + s.checkStockType.equals("O-"));
                      break;
                  case "AB+":
                      BloodCode=7;
                      System.out.println("Blood Type AB+ &amp; Blood Code is : " + BloodCode + "No of Bags avaliable" 
                              + s.checkStockType.equals("AB+"));
                      break;
                  case "AB-":
                      BloodCode=8;
                      System.out.println("Blood Type AB- &amp; Blood Code is : " + BloodCode + "No of Bags avaliable" 
                              + s.checkStockType.equals("AB-"));
                      break;
                  default:
                      System.out.println("There is no code for the type you write !!");
                      break;
              }
          }
  </code></pre>