So this works:
int i; Object a = (Object) i; int[] t; Object b = (Object) t; String[] s; Object[] t = (Object[]) s;
But this does not:
As you say: String inheriting from Object and int not inheriting from Object, that's the reason. int, boolean, double... are primitive types and they don't extend from Object. You should use Integer instead of int.
Integer[] t; Object[] z = (Object[]) t;