Check:
System.out.println(form.getClass()); Tray:
public static void main(String args[]) {
List list = new ArrayList();
list.add(new Point(3, 4));
System.out.println(list.getClass());
Object ob = list;
System.out.println(ob.getClass());
ArrayList al = (ArrayList) ob;
System.out.println(al.getClass());
List list2 = (List) ob;
System.out.println(list2.getClass());
AbstractList abstl = (AbstractList) ob;
System.out.println(abstl.getClass());
AbstractCollection ac = (AbstractCollection) ob;
System.out.println(ac.getClass());
Object[] objArr = abstl.toArray();
System.out.println(objArr[0].getClass());
//
ArrayList al3 = (ArrayList) abstl;
System.out.println(ac.getClass());
Collection coll = (Collection) list;
System.out.println(coll.getClass()); Casting to classes (in the chain of inheritance) , interfaces. But list is always ArrayList.
Created is new varible "formBean", that refer to (represent) the same object "form". http://java.sun.com/docs/books/tutorial/java/IandI/subclasses.html