In general, member variables are on the heap, parameters and local variables in a method are on the stack. I almost never think about heap and stack (unless I do recursion wrong and blow up the stack.) I do think about scope ... does this information need to live beyond the method?
I recently read some quotes from one of the creators of Simula, a direct precursor to object oriented thinking. They just moved some data from the stack to the heap. They didn't think it was any big revolution, just a convenient place to store stuff they'd need again later.
Here's the first in a neat series getting Under The Hood of the JVM. It's a nice introduction to all kinds of JVM internals, even if it's a couple releases old now.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com