In this article, I’ll focus on the Runtime Data Areas described in the JVM specifications. Those areas are designed to store the data used by a program or by the JVM itself. I’ll first present an overview of the JVM then what bytecode is and finally the different data areas.
There are 4 types of references in JAVA: strong references, soft references, weak references, phantom references.
Those references differ only by the way the garbage collector manages them. If you have never heard of them, it means that you were only using the strong ones. Knowing the difference can help you, especially if you need to store temporary objects and can’t use a real caching library like eHcache or Guava.
Since those types are stongly related to the JVM garbage collector, I’ll briefly recall some information about garbage collection in JAVA and then I’ll present the differents types.