title: How to concatenate parts of strings in Java?
body: <p>I have to print out an account username which will be their first initial, first 3 letters of their last name, and the last 4 digits of their student number (with no spaces). I don't know how to concatenate the first 3 letters of a string or last 4 digits of a number. Can somebody help please?</p>
  
  <pre><code>import java.util.Scanner;
  
  public class Project {
  
      public static void main (String args[]){
  
          Scanner user_info = new Scanner(System.in);
  
          String first_name;
          System.out.print("Enter your first name: ");
          first_name = user_info.next();
  
          String last_name;
          System.out.print("Enter your last name: ");
          last_name = user_info.next();
  
          String student_number;
          System.out.print("Enter your student number: ");
          student_number = user_info.next();
      }
  }
  </code></pre>