hi Barry
y is a B. You can assign a B to y or you can assign a subclass of B to y.
You cannot assign a super class of B to y.
Hope Y is a B was wrong in terms of your explanation. I hope it was B is a Y .
For example :
MyFrame is a Frame.
so
So Frame reference variable can hold Frame , MyFrame , is a MyFrame (subclass) or null