title: Generating random email addresses (more efficient append)
body: <p>I am taking intro to computer science and our professor gave us some labs to do, one of which is making an email for students.</p>
  
  <p>The rules are:<br>
  1. Ask user for first and last name.<br>
  2. Use the first letter of the first name, the first 6 letters of the last name, and a 3 digit random number to make an email address. All lower case.<br>
  <strong>Example</strong>: If user input Joe Humphry, then the output would be:<br>
  <strong>jhumphr167@students.nyu.edu.</strong></p>
  
  <p>I think I have it figured out, but I am curious if there is a more efficient way to go about it.<br>
  My question is:<br>
  <strong>Is there a more efficient way to code this, specifically with the appends, so that I won't have to make a new line of code for each append?</strong>    </p>
  
  <p>I tried to use:<br>
   <code>append(num1, num2, num3)</code><br>
  to no avail. </p>
  
  <pre><code>public static void main(String[] args) {
  
      Scanner scan = new Scanner(System.in);
  
      //asks for first name
      System.out.println("What is your first name?");
      String firstname = scan.next();
  
  
      //asks for last name
      System.out.println("What is your last name?");
      String lastname = scan.next();
      if (lastname.length()&gt;6)
          lastname = lastname.substring(0,6);
  
      //generates random number
      int min = 0;
      int max = 9;
      StringBuilder randoms = new StringBuilder();
      Random random = new Random();
      int num1 = random.nextInt(max-min+1)+min;
      int num2 = random.nextInt(max-min+1)+min;
      int num3 = random.nextInt(max-min+1)+min;
      randoms.append(num1);
      randoms.append(num2);
      randoms.append(num3);
  
      // combine and print
      System.out.println(firstname.toLowerCase().charAt(0)
                          + lastname.toLowerCase()
                          + randoms
                          + "@students.nyu.edu");
  
  }
  </code></pre>