title: Multiple inputs with arrays using String - Names
body: <p>I need to write a program that will have a user enter a list of tutor names.  Only up to 10 peer tutors may be hired. Then, the program will present each name, based on a list alphabetized by last name. This is what I have so far, but it does not work and I don't know what to do. I need it to continue to run until I stop it and continue with more of the program. </p>
  
  <pre><code>import javax.swing.JOptionPane;
  import java.util.Arrays;
  
  
  public class Report {
  
      public static void main(String[] args) {
  
            int numTutors = 10;
            String[] listNames = getTutorNames();
      }
  
      public static String[] getTutorNames() {
  
            String firstName;
          String lastName;
          String[] listNames = new String[10];
  
          for (int x = 0; x &lt; listNames.length; x++) {
              firstName = JOptionPane.showInputDialog(null, "Enter Tutor's First Name: ");
              lastName = JOptionPane.showInputDialog(null, "Enter Tutor's Last Name: ");
  
              if (firstName.equals("")) &amp;&amp;  lastName.equals("")) {
                  break; // loop end
              }
              listNames[x] = lastName + ", " + firstName;
          }
          return listNames;
      }
  }
  </code></pre>