It is very important to understand Java programming but for that Java Virtual Machine, runtime data areas are needed to understand as a prerequisite. OutOfMemoryError is one of the most dreaded errors in Java and is associated with Java Virtual Machine (JVM) memory areas.