为什么非static方法的本地变量表的第一个参数是this

在jvm规范的2.6.1 Local Variables节中描述了第一个参数总是当前实例对象的引用即this
The Java Virtual Machine uses local variables to pass parameters on method

invocation. On class method invocation, any parameters are passed in consecutive

local variables starting from local variable 0 . On instance method invocation,
local variable 0 is always used to pass a reference to the object on which the
instance method is being invoked ( this in the Java programming language).

你可能感兴趣的:(java)