Howdy!
Leftside is checked at Compile Time.
Rigthside checked at Runtime .......
..??
Not quite. The variable gets a type once and for all to know what methods or fields can be used on objects of the type.
But what the object really is (the right side) can only partially be checked by the compiler.
The compiler only looks, if the type hierarchy is ok, e.g. it won't let you assign a String to an Animal variable.
But when these are ok, the rest happens at runtime, because you can easily assign subclasses to yor variable. Or implementers if the variable has got an Interface type.
Here's an example for assigning objects of different subtype at runtime, for those who are bored of animals.
:
At compile time the compiler does not know exactly what subtype will be assigned as element of the array. Compiler only checks, if it really is a subtype of Planta (or Planta itself). But the object type will be known only at runtime.
output e.g. like
I am a Bougainvillea
I am a Planta
I am a Planta
I am a Conium and I'm poisonous
I am a Magnolia
I am a Bougainvillea
I am a Magnolia
I am a Bougainvillea
I am a Bougainvillea
I am a Bougainvillea
Yours,
Bu.