title: how to store more than string variable input in one string from loop (JAVA)
body: <p>I am semi-beginner in java </p>
  
  <p>This is my code </p>
  
  <pre><code>        while (true) {
          System.out.println("Choose the number");
          System.out.println("1");
          System.out.println("2");
          System.out.println("3");
          System.out.println("4 for Display summary and Exit");
  
          int cho = input.nextInt();
  
          System.out.println("Registration");
  
          System.out.println("Enter your full name (first and lastname)");
          String name = input.next();
  
          System.out.println("Enter your National ID");
          int id = input.nextInt();
  
          System.out.println("Enter your phone number");
          int phone = input.nextInt();
  </code></pre>
  
  <p>I made if statement for all the choices 1,2,3,4</p>
  
  <p>And this is number 4 if statement </p>
  
  <pre><code>            else if (cho == 4) {
              System.out.println("Summary");
          }
  </code></pre>
  
  <p>I want in this loop if user Choice 4 in the main menu prints a summary of all registered users (name, phone, id) that choices 1,2,3, even if the user made more than one register, and then exits the program.</p>