I need to add an object to a list, however I do not know how. Can somebody help me?
import java.util.List; import java.util.ArrayList;
List<Object> list = new ArrayList<Object>();
Actor actor = new Actor(){}; // some actor to be added to List
list.add(actor);
String text = "abcdefg";
list.add(text);
World world = this;
list.add(world);
int n = 125;
list.add((Integer)n);