Search Interview Questions
| More than 3000 questions in repository.|
There are more than 900 unanswered questions.
Click here and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
|Interview Questions and Answers|
|Ans. All threads share a common heap.|
Each thread has a private stack, which it can quickly add and remove items from. This makes stack based memory fast, but if you use too much stack memory, as occurs in infinite recursion, you will get a stack overflow.
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  memory management  heap memory Asked in 1 Companies|
|What is a String Pool ?|
|Which kind of memory is used for storing object member variables and function local variables ?|
|Why do member variables have default values whereas local variables don't have any default value ?|
|Difference between Stack and Heap memory ?|
|What is OutOfMemoryError in Java?|
|Do threads have a distinct heap ?|
|Can we do a thread specific heap allocation ?|