First of all,since java has a strict type system ,programs are checked for type correctness at the compilation time and bytecode of programs is checked when the classes are loaded to bytecode verifier before the execution.
Though the introduction of generics has broaden the potencials of Java type system, but due to java has subtypes many problems occurs such in the above example:
String [] a ={"Hello"};
Object [] b= a;
b[0]= false;
String s=a[0];
System.out.println(s);
In the above example we use that String class is a subclass of Object . My question is what is the reason that the compiler does not produces any warning about the above program .When I try to run it (of course) throws an exception. Also what problems/consequences the above program could have in java implementation (I mean are there any obvious problems?? ).