Can you write down your program ?
1. "compare a new input string with equalsIgnoreCase with a name"
YES
2. "recovered from an ArrayList object by using toString()"
??? arrayList.toString() -- WRONG
String name = (String)arrayList.get(i) -- OK
3. "and passing the 'name' variable back to the constructor"
???
4. "of the first class to prevent two similar names being input?"
???
My version:
ArrayList list = new ArrayList();
for(;
String str = inputString();
String normalizedStr = str.toLowerCase();
if( list.contains(normalizedStr) )
System.out.println("Already exists");
else
list.add(normalizedStr);
}
inputString() - function that ask user to input string somehow...
[ December 22, 2003: Message edited by: Igor Ko ]