找考题网-背景图
单项选择题

A.SuperClass s =new SubClass()B.SubClass sc =(SubClass)……

现有两个类,SuperClass是父类,SubClass是子类,下列选项中属于向下转型的是()。

A.SuperClass s =new SubClass()
B.SubClass sc =(SubClass)superClass
C.SubClass s =new SubClass()
D.SuperClass s =new SuperClass()