Your problem is that you're referencing the same object cause you created the object before the loop. Should be
public static void main(String args[]) {
ArrayList al = new ArrayList();
for (int i = 0; i < 10; i++) {
Modelclass obj = new Modelclass();
obj.setName(2 + i);
obj.setRoolno(4 + i);
System.out.println(obj);
//if (!al.equals(obj)) {
al.add(obj);
System.out.println(obj.getName() + "" + obj.getRoolno());
//}
}
}