ArrayList<String> relNames;
public String[] getRelNames()
{
if (database == null)
throw new Error("No database is connected.");
else
return relNames.toArray();
}
the code above wont compile because relNames.toArray(); returns Object[], but i ve specified in the declaration that ArrayList<String> relNames; dont quite understand why?