File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Exceptions in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Exceptions in java" Watch "Exceptions in java" New topic

Exceptions in java

anish reddy
Ranch Hand

Joined: Apr 19, 2008
Posts: 74
i want to know the exact differnce between out of memory exception and
stack overflow per my idea one is thrown by jvm and other is by application.i want to know in a more detailed manner whats the differnce between above two.
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

Well, one indicates that memory is full (there are too many objects in memory) and the other indicates that a thread's stack has overflowed (a method has called a method which called a method which called a method.... too many times.) These are two rather different things, yes?

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: Exceptions in java
It's not a secret anymore!