超载 [英] overload

查看:82
本文介绍了超载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好!


我只是想知道是否可以通过使用

不同的返回类型来重载方法。


// Tony

Hello!

I just wonder if it''s possible to overload a method only by having a
different return type.

//Tony

推荐答案

Tony Johansson写道:
Tony Johansson wrote:
你好!

我只是想知道是否可以通过具有不同的返回类型来重载方法。

// Tony
Hello!

I just wonder if it''s possible to overload a method only by having a
different return type.

//Tony







No


> Tony Johansson写道:
> Tony Johansson wrote:
我只是想知道是否可以通过使用不同的返回类型来重载方法。
I just wonder if it''s possible to overload a method only by having a
different return type.





Google" covariant return types" ;.


-

Phlip
http://www.c2.com / cgi / wiki?ZeekLand



Google "covariant return types".

--
Phlip
http://www.c2.com/cgi/wiki?ZeekLand


Phlip写道:
Tony Johansson写道:
Tony Johansson wrote:


我只是想知道是否可以通过具有不同的返回类型来重载方法。
I just wonder if it''s possible to overload a method only by having a
different return type.




Googlecovariant return types。



Google "covariant return types".




您可能正在考虑覆盖。然而,问题是关于

重载。答案仍然是不,拉里是正确的。


V



You may be thinking "override". The question, however, is about
"overload". The answer is still "no", Larry is correct.

V


这篇关于超载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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