OutOfMemoryError in Java


OutOfMemoryError (OOME) is a runtime error thrown when the Java Virtual Machine cannot allocate an object because it is out of memory and no more memory could be made available by the garbage collector.




Common causes




Heap exhaustion: too many objects or very...