I implemented this code:
class A {
//some code
}
class B extends A {
// some code
}
class C {
public static void main(String []args)
{
when you say B extends A, A becomes father of B now technically B has all charecteristics of A plus its own while A has charecteristics of itself only
if you say convert A into B and assign to B, that is ok but if you say cast A into B and assign to A, thats not possible as A here does not know extra charecteristics present in B.
and these things happens at runtime so it will give you a runtime error.