Our issue is like this: We want to pass different enum types to a method and call the values() method on the type.
public enum Testing {
A, B, C, D
}
public enum Retesting {
E, F, G, H
}
public static Object[] getValues(Enum e) {
return e.values(); // ! Compilation Error
}
public static void main(String[] args) {
Testing t = Testing.A;
getValues(t);
}
Does anyone know if how something like this should be achieved or if it's possible at all?
Thank you