This seems like some java error. I see no error with this code - in fact, it was working perfectly just a while before that. The line before the last line gives me this error: stringindexoutofboundsexceptions: String index out of range : 7, even before I compile the program and input the input.
public class person_manager { static File file = new File("C:\\Documents and Settings\\Administrator\\My Documents\\sorted_list.txt"); static File file2 = new File("C:\\Documents and Settings\\Administrator\\My Documents\\the_person_modification_database.txt"); static StringBuffer contents = new StringBuffer(); static BufferedReader reader = null; static BufferedReader reader1 = null; static int count = 0; static int count1 = 0; static int listlength = 0; static String[] list = null; static String temp1 = null; static Path file1 = FileSystems.getDefault().getPath("C:\\Documents and Settings\\Administrator\\My Documents\\", "sorted_list.txt"); static person[] people_array = null; static int arraysize = 0; //63 public static void main(String[] args) throws IOException { try { reader = new BufferedReader(new FileReader(file2)); reader1 = new BufferedReader(new FileReader(file2)); String text = null; // repeat until all lines are read while ((text = reader.readLine()) != null) { contents.append(text).append(System.getProperty("line.separator")); count++; } list = new String[count]; people_array = new person[count/6]; arraysize = count/6; count = 0; while ((temp1 = reader1.readLine()) != null) { if (temp1.substring(0, 2).compareTo("na") == 0 ) { people_array[count1] = new person(); people_array[count1].name=temp1.substring(5, temp1.length());} try { if (temp1.substring(0, 2).compareTo("he") == 0 ) {people_array[count1].height=Integer.parseInt(temp1.substring(7, temp1.length()));} } catch (NumberFormatException f) {people_array[count1].height=0;} try { if (temp1.substring(0, 2).compareTo("we") == 0 && (temp1.substring(6, 7).compareTo("-") != 0) ) { people_array[count1].weight=Integer.parseInt(temp1.substring(7, temp1.length()));} } catch (NumberFormatException f) {people_array[count1].weight=0;} if (temp1.substring(0, 2).compareTo("ey") == 0) {people_array[count1].eyecolor=temp1.substring(10, temp1.length());} if (temp1.substring(0, 7).compareTo("weight-") == 0) {people_array[count1].weight_status=temp1.substring(14, temp1.length());}