/* Array3.java CIS 160 David Klick 2004-11-01 Processing file data before saving it in an array. Using methods to process data. */ import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; public class Array3 { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new FileReader("people.txt")); final int MAXSIZE = 100; int numRecs = 0; String[] names = new String[MAXSIZE]; String s; s = in.readLine(); while (s != null) { if (numRecs < MAXSIZE) { names[numRecs++] = processName(s); } else { System.out.println("Error: Too many records in file"); break; } s = in.readLine(); } in.close(); for (int i=0; i= 0) { if (sb.charAt(ndx) == '"') sb.deleteCharAt(ndx); ndx--; } return sb.toString(); } }