To be exact, I'm curious as to whether an Object[] array is capable of storing and accessing other objects' methods. Here's a little example of what I'm trying to achieve.
//declare an array of *different* objects
private static Object[] function = {new Object1(),
new Object2()};
//calls method(getNumber) from Object1()
function[0].getNumber();
Since I already found out that you can stack same objects into an array, I want to figure out if its possible to do so with different methods without using ArrayList. Just curious, so if you think there isn't a way to do this just tell me so, thanks :)