
-----------------------------------
EricUnreal
Thu Jan 26, 2012 11:19 pm

Please Help, should be working but isn't
-----------------------------------
My final is tommorrow and i'm having trouble with some questions that are similar to those that will be on the exam. Here's what i have:


I have to insert a word into the list while maintaining alphabetical order. What i'm trying to do is insert the word, then just re-sort the list.

import java.util.*;
import java.io.*;

public class WordList
{
    private ArrayList list;

    public WordList()
    {
        list = new ArrayList();
        getData();
    }
    public void addWord(String aWord)
    {
        list.add(aWord);
        for (int current=0; current