GeekInterview.com
Series: Subject: Topic:
Question: 15 of 573

Explain When Java Application can run out of memory ?

Asked by: janpachno | Member Since Feb-2012 | Asked on: Feb 12th, 2012

View all questions by janpachno

Showing Answers 1 - 3 of 3 Answers

Yes, Java applications can run out of memory, like when images or image buffers are not getting garbage collected or when dispose() method is not used.

We all know Java automatically garbage collects unused objects. But you must remember that an object is considered as unused only when the object no longer referenced. That means a referenced class continues to exist and to take up memory space even if it is not used.

  
Login to rate this answer.
sampra

Answered On : Mar 6th, 2012

View all answers by sampra

We all know Java automatically garbage collects unused objects. But you must remember that an object is considered as unused only when the object no longer referenced. That means a referenced class continues to exist and to take up memory space even if it is not used.

  
Login to rate this answer.
Anon

Answered On : Apr 12th, 2012

if you have an infinite loop that keeps on doing things that take up memory (like creating objects).

Yes  1 User has rated as useful.
  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.