ArrayList of custom class has no .add() method:
I can define an ArrayList of Object's:
ArrayList<Object> thing = new ArrayList<Object>();
thing.add(otherThing); // works
However, when I define a list of a custom class Thing:
ArrayList<Thing> thing = new ArrayList<Thing>();
thing.add(otherThing); // error
Canvas.java:33: cannot find symbol
symbol : method add(java.lang.Object)
location: class java.util.ArrayList<Thing>
thing.add(otherThing);
^
1 error
Is this possible?
Thanks
otherThingdeclared?