title: Adding parameters to arraylist with Java
body: <p>I am testing my college class and when the user types in "add" it adds a new student to the arraylist in the college class.</p>
  
  <pre><code>   Scanner myInput=new Scanner (System.in);
     String information=myInput.next(); //I know this is incorrect not sure what else to do
      directory.addStudent(information);
  </code></pre>
  
  <p>here the directory is the object of the arraylist containing students. the addStudent method is in the College class, and looks like this:</p>
  
  <pre><code>  public void addStudent (String studentName, long studentID, String address) {
          Student newStu= new Student( studentname, studentID, address);
          collegeList.add(newStu); //here collegeList is the name of the arraylist in College class
     }
  </code></pre>
  
  <p>anyways my question seems simple but can't figure it out. I want to know how to split the information so that it can satisfy the parameters in addStudent method...As you can see information will be a String but I want studentID to be a long not a string what can I do? </p>