3. Use stack allocations instead of heap allocations.Java stores data in two different kinds of memory structures: the stack and the heap.Most programmers are more familiar with heaps.A heap is a dynamically-allocated pool of memory that is visible to all threads.It's where the Java Virtual Machine (JVM) typically stores objects and classes.
[
add
]
[
|
|
...
]