posted 7 years ago
The javap tool can tell you this, using the -verbose option. At least, it can tell you about what the compiled class file says the stack usage should be. It's possible for HotSpot to modify this at runtime, I suppose. But I doubt it will change too much. Unless you use the funky JVM options like -XX:+DoEscapeAnalysis.