Ok, what I'm trying to do is make a static method that passes in an array object (no matter the type, so it can be a class that's user written) and returns an array type. Whenever I try and compile the drivers, it says incompatible type. :( HELP!
There is nothing wrong with the method.
Method
public static Object[] deleteIndex(Object[] arr, int Index)
error thrown in driver at:
list2 = arrayFix.deleteIndex(list2, 2);
testArray.java:XX: incompatible types
found : java.lang.Object[ ]
required: Die[ ]
list2 = arrayFix.deleteIndex(list2, 2);
list2 is an array of type Die.
The driver only has a problem at this point. If I take it out, it compiles.
2007-02-08
08:13:59
·
2 answers
·
asked by
David Calisuni
2