I know that Java is static language, and there is dynamic check when it comes to arrays : but I can't understand why this happen, can someone explain to me this example in both cases when : A[] is sub-type to B[], or B[] is sub-type to A[] ? which will fail and why ?
f(A[] as) {
as[0] = new A(); // **?!**
}
B[] bs = new B[10];
f(bs); // **?!**
B b = bs[0]; // **?!**