hello,
when compiling this method, i get a "missing return statement error" because there is no return statement after the while loop and before the method closes. i understand that there needs to be one there, i'm just not sure what the value should be. i have commented out the area where i am having trouble with "//". thanks in advance.
/**
* lookup() should return values.get(i) if we find i for which
* keys.get(i).equals(s), or null if not found
*/
public String lookup (String s) {
int i = 0;
while (i<keys.size()) {
if (keys.get(i).equals(s)) {
return values.get(i);
}
else {
return null;
}
}
//return ? ;
}