Java隐式"this"方法中的参数? [英] Java implicit "this" parameter in method?

查看:221
本文介绍了Java隐式"this"方法中的参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Java编程语言中,对象上的方法调用是通过隐式传递对对象的引用来起作用并作为静态方法起作用的吗?

Within the programming language Java do method invocations on an object, work by implicitly passing a reference to the object to act on and working as static methods?

推荐答案

有关方法调用方式的详细信息,请参见

Details on how method invocation works can be found in the Java SE 7 JVM specification, section 3.7. For an instance method the this reference is passed as the first parameter. This reference is also used to select which method to invoke, since it might be overridden in a subclass, so it is a bit more complicated than a static method.

这篇关于Java隐式"this"方法中的参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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