How does JVM know the method's stack depth?

When a caller push several operands into its operandstack,how does the JVM know the number of the callee's parameters and pop correct number of operandsout of the stack.
[205 byte] By [houyiming2001] at [2007-9-26 10:35:30]
# 1
It's determined by the signature of the method given in the invokestatic, invokevirtual, invokeinterface, or invokespecial bytecode.
schapel at 2007-7-1 23:00:07 > top of Java-index,Java HotSpot Virtual Machine,Specifications...