什么是执行错误? [英] whats wrong with the implementation?

查看:72
本文介绍了什么是执行错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

public class animal: dog
{
}

推荐答案

它是倒退的逻辑。 狗应该继承一个更普遍的类,如动物,而不是相反。然而,除了它没有完整之外,没有任何内在错误,我们不确定动物继承的狗类是否存在。
It is backwards in its logic. A "dog" should inherit from a more general class such as "animal", not the other way around. However, there is not anything inherently wrong with that, other than it is not complete and we are not sure if the "dog" class that animal is inheriting even exists.


这篇关于什么是执行错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆