Can i use contains() to check if an element i m trying to insert in an Arraylist is already there?
protected void addTeacher(Teacher t){
if (!(teacherList.contains(t)))
teacherList.add(t);
}
I have created a teacher class. Thanks,