ArrayList is generic, so if you do not define the objects put in, you must do so when you take them out. Solution 1 is to cast the object when you get it from the list
...
Type: Posts; User: copeg
ArrayList is generic, so if you do not define the objects put in, you must do so when you take them out. Solution 1 is to cast the object when you get it from the list
...
Please post the code and errors you are receiving, both of which are a wealth of information to help solve your problem
ArrayList colors = new ArrayList();
//add all colors to the list
for ( int i = 0; i < colors.size(); i++ ){
myPen.setColor(colors.get(i));
}