public class CheckArrayCast
{
public void getArray(long[] x)
{
for(int i = 0; i<x.length;i++)>
{
System.out.println("# "+i+" = " + x[i]);
}
}
public static void main(
String[] args)
{
int[] small = {1,2,3,4,5,6,7,8,9,0};
CheckArrayCast c = new CheckArrayCast();
c.getArray(small);
}
}
the following code gives me a compiler error
Incompatible type for method. Can't convert int[] to long[].
c.getArray(small);
Could anyone please explain.. i thought i knew casting pretty well.
------------------
denice the menace