Hi Amond,
The rule may be arbitrary, but array of primitives CANNOT be converted. It has nothing to do with space need for storage, as following example shows. Array of 5 Objects can refer to array of 500 Strings and return correct value:
class
Test {
public static void main(
String[] args){
Object o[] = new Object[5];
String s[] = new String[500];
s[4] ="4";
s[400] = "400";
o= s;
System.out.println(o[4]);
System.out.println(o[400]);
}
}
Aniruddha