Pinball_Wizard
03-01-04, 08:51 PM
Help please? Can anyone see why im getting a missing return statement error in this code?
public Boolean deleteLecturer(Integer lecturerId){
for(int i = 0;i<lecturers.size(); i++){
Lectures lectures = new Lectures();
Lecture gotHashTable = new Lecture();
gotHashTable=(Lecture)lectures.lectures.get(newInt eger(i)
if (gotHashTable.getLecturer().equals((Integer)lectur erId)){
return new Boolean ("False");
}else if (lecturers==null){
return new Boolean("False");
}else if (lecturerId==null){
return new Boolean("False");
}else if (lecturers.get(lecturerId)==null){
return new Boolean("False");
}else{
lecturers.remove(lecturerId);
Boolean affirmative = new Boolean("True");
return affirmative;
}
}
}
Cheers guys!
public Boolean deleteLecturer(Integer lecturerId){
for(int i = 0;i<lecturers.size(); i++){
Lectures lectures = new Lectures();
Lecture gotHashTable = new Lecture();
gotHashTable=(Lecture)lectures.lectures.get(newInt eger(i)
if (gotHashTable.getLecturer().equals((Integer)lectur erId)){
return new Boolean ("False");
}else if (lecturers==null){
return new Boolean("False");
}else if (lecturerId==null){
return new Boolean("False");
}else if (lecturers.get(lecturerId)==null){
return new Boolean("False");
}else{
lecturers.remove(lecturerId);
Boolean affirmative = new Boolean("True");
return affirmative;
}
}
}
Cheers guys!