/* Array3.java CIS 160 11/01/04 processing file data before saving it in an array; using methods to process data */ import java.io.*; 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(); } }