实例化问题
视频中用的实例化是
Telphone tel1 = new CellPhone();
Telphone tel2 = new SmartPhone();
为啥不直接直接使用
CellPhone() tel1 = new CellPhone();
SmartPhone tel2 = new SmartPhone();
?????
视频中用的实例化是
Telphone tel1 = new CellPhone();
Telphone tel2 = new SmartPhone();
为啥不直接直接使用
CellPhone() tel1 = new CellPhone();
SmartPhone tel2 = new SmartPhone();
?????
2018-08-14
举报