- Having multiple aliases with updatable data with different type are unsound. Example,
//B < A B  b =new B(); A  a = b; a = new A(); b.aMethodNotInA(); //error, unsound!
Solution is to disallow subtyping using arrays, this solution is also adopted by COOL. The above code will be valid if B = A.
Java produces exception by checking at run-time, if an array is created then it checks for all of it’s assignment. If object type doesn’t match then error is raised. This adds an overhead of checking the array of objects and yes, primitive types are not classes.