In a programming assignment we are not allowed to use lists, we only get to use arrays, however I have multiple classes and arrays for all of them that I want to check for a variable in them.
Foo f = new Foo();
Bar b = new Bar();
Foo[] fArray = new Foo[1];
fArray[0] = f;
CheckStatus(fArray);
public boolean CheckStatus<T>(T[] array) {
    if(array[0].IsTrue()) {
        return true;
    }
return false;
However, I only get the issue "cannot resolve symbol "IsTrue" I can get it to work by directly casting it to a Foo object but then it wont work with Bar etc.
It has worked great with the generics of for most other things such as extending array length but when I need to access the variables of the object I need to cast it and for that I will need specific if statements for each type of class my program has that I want to use with this method.
Thankful in advance for any help I can get here.