title: How to get the first letter of a full name string using loop?
body: <p>Write an application that prompts a user for a full name and street address and construct an ID from the user’s initials and numeric part of the address. For example, the user William Henry Harrison who lives at 34 Elm would have an ID of WHH34, whereas user Addison Mitchell who lived at 1778 Monroe would have an ID of AM1778. Save the file as ConstructID.java.</p>
  
  <p>this is what have so far, w/c my teacher says its wrong...</p>
  
  <pre><code>import java.util.*;
  public class ConstructID {
  
      public static void main(String[] args) {
  
          String name1, address1, address2;
  
          Scanner kevs = new Scanner(System.in);
  
          System.out.println("Enter your fullname. Encluding Middle Initial, Separated by spaces.");
  
          name1 = kevs.next();
          name2 = kevs.next();
          name3 = kevs.next();
  
          name1 = name1.toUpperCase();
          name2 = name2.toUpperCase();
          name3 = name3.toUpperCase();
  
          name1 = name1.substring(0,1);
          name2 = name2.substring(0,1);
          name3 = name3.substring(0,1);
  
          System.out.println("\nEnter your address. Separated by spaces.");
  
          address1 = kevs.next();
          address2 = kevs.nextLine();
  
  
          do {
  
              if (address1 == address1.substring(0,1) || address1 == address1.substring(0,2) || address1 == address1.substring(0,3) || address1 == address1.substring(0,4) || address1 == address1.substring(0,5) || address1 == address1.substring(0,6))
              System.out.println("\nYour ID: " + name1 + name2 + name3 + address1);
  
          } while (address1 == address2);
      }
  }
  </code></pre>
  
  <p>NOTE: <em>I can't use array</em> :( The topic of this question is all about loop and string.. no array.. so please help.. :((</p>