Reputation: 7042
Do java compilers (javac or eclipse) try to compile method calls as static when the target method is known statically (even if it's not a static method). Eg.
class A { void foo() { doStuff(); } } ... A a = new A(); a.foo(); // is this compiled as virtual call or static call?
Upvotes: 0
Views: 229
Reputation: 22514
See my response at How to find out what optimizations the JVM applied to my code?
Upvotes: 1