title: parse comma separated data in java
body: <p>I need to parse the input data into 4 different parameters as in below format before calling the constructor to create the object. Any ideas?</p>
  
  <p>sample data input format: </p>
  
  <pre><code>rawdata = "900,300,Ernest,Fuller\n777,555,Henry,Miller\n";     //and so on
  </code></pre>
  
  <p>.</p>
  
  <pre><code>class BaseRecord {
  
        int callerId;
        int areaId;
        String firstName;
        String lastName;
  
        BaseRecord (int cId, int aId, String fName, String lName)
  
                  callerId = cId;
                  areaId = aId;
                  firstName = fName;
                  lastName = lName;
  
  }
  </code></pre>