title: How do I check if user input is found in array?
body: <p>I'm trying to check if user input is equal to the data I have in my arrays, 
  then printing the int array that corresponds with the string array,
  but nothing appears when I run the program.</p>
  
  <p>What am I doing wrong?</p>
  
  <p>This is everything I have in my main method:</p>
  
  <pre><code>  String firstname;
    String middleinitial;
  
    System.out.println("What is your first name?");
    firstname = myScan.nextLine();
  
    System.out.println("What is your middle initial?");
    middleinitial = myScan.nextLine();
  
   String[] firstNameLetter = {"A", "Albert", "Alice", "Ann", "Anna", "Annie",        "Arthur", 
              "B", "Bernard", "Bette", "Bettie", "Betty", "C", "Carl",
              "Catherine", "Charles", "Clara", "D", "Donald", "Dorothy, E",
              "Edward", "Elizabeth", "F", "Florence", "Frank", "G", "George",
              "Grace", "H", "Harold", "Harriet", "Harry", "Hazel", "Helen",      "Henry",
              "I", "J", "James", "Jane", "Jayne", "Jean", "John", 
              "Joan", "Joseph", "K", "L", "M", "Margaret", "Martin",
              "Marvin", "Mary", "Melvin", "Mildred", "N", "O", "P",
              "Patricia", "Paul", "Q", "R", "Richard", "Ruby", "Robert",
              "Ruth", "S", "T", "Thelma", "Thomas", "U", "V",
              "W", "Walter", "Wanda", "William", "Wilma", "X", "Y",
              "Z"};
  
      int[] firstNameNumber     = {000, 020, 020, 040, 040, 040, 040,
               060, 80, 80, 80, 80, 100, 120,
               120, 140, 140, 160, 180, 180, 200,
               220, 220, 240, 260, 260, 280, 300,
               300, 320, 340, 340, 360, 360, 380, 380,
               400, 420, 440, 440, 440, 460, 460,
               480, 480, 500, 520, 540, 560, 560,
               580, 580, 600, 600, 620, 640, 660,
               680, 680, 700, 720, 740, 740, 760,
               760, 780, 800, 820, 820, 840, 860,
               880, 900, 900, 920, 920, 940, 960,
               980};
  
  String[] middleNameLetter = {" ", "A", "B", "C", "D", "E", "F",
               "G", "H", "I", "J", "K", "L", "M",
               "N", "O", "P", "Q", "R", "S", "T",
               "U", "V", "W", "X", "Y", "Z"};
  
  int[] middleNameNumber    = {0, 1, 2, 3, 4, 5, 6,
                               7, 8, 9, 10, 11, 12, 13,
                               14, 14, 15, 15, 16, 17, 18,
                               18, 18, 19, 19, 19, 19};
  
  for (int count = 0; count &lt; firstNameLetter.length; count++)
  {
      if (firstname.equals(firstNameLetter[count]))
      {
          System.out.println(firstNameNumber[count]);
      }
  }
  
  for (int count = 0; count &lt; middleNameLetter.length; count++)
  {
      if (middleinitial.equals(middleNameLetter[count]))
      {
          System.out.println(middleNameNumber[count]);
      }
  }
  </code></pre>