first one is good question, At run time it should be fine as the actual Object is tester which does implement face, but point is why compiler support it at the compile time, as there is no relationship between
test and face.
Compiler allows casting with in the same hirerachy tree.
I thinked a lot but no result from my side, lets hope someone else will find a proper explanation : why test and face are coming under same hirerachy tree ?
regarding your second question :
Arrays.equals(a, b) --> checks the content of arrays, as both have same content so result is true.
a.equals(b) --> this check whether both a and b refers to same Object on heap or not.Arrays are also object and you have created two different array for a and b, so answer should be false.
[ April 21, 2008: Message edited by: Sunny Jain ]