开发者

What is the difference Between Extends and Instantiation?

What is the difference Between Extends and Instan开发者_Python百科tiation?


When you instantiate a class you are making an instance of that class. In other words you are making a copy of that class. Read more here

When you extend a class you inherit that class' attributes and methods. This way you can reuse that code in your own class without having to rewrite that functionality. Read more here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜