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.
|Java - Interview Questions and Answers|
|Ans. Function call allocates a stackframe in stack. Every stackframe will use some memory to store local variables, parameters and to remember return address. Without terminating condition stackframes will keep consuming memory from stack and eventually program will result in stackoverflow error.|
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  recursion   break statement  break  stackoverflow exception  stackoverflow  memory management  memory  exceptions|
|Does garbage collection guarantee that a program will not run out of memory?|
|What are different ways to create String Object? Explain.|
|What is a String Pool ?|
|Describe what happens when an object is created in Java ?|
|Describe, in general, how java's garbage collector works ?|
|What are various types of Class loaders used by JVM ?|
|Explain java.lang.OutOfMemoryError ?|
|What are strong, soft, weak and phantom references in Java ?|
|What are the disadvantages of using arrays ?|