I want to have a method that takes an Object as a parameter, and add it to an arraylist. Later on, i want to call a method on this object, but the hole time, I don not want to define the object as a specific type, just type Object. I know the object contains the method I want to call because I make sure I only pass object with that method. Something like this:
public void addElement(Object obj){
    elementlist.add(obj);
}
.
. 
.
elementlist.get(i).SomeMethodIknowItHas();
However, this is not working. Is there some way I can force it to call that method?
