dcsimg
Exception handling in java
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   manjula_nataraj
Posted On:   Wednesday, September 12, 2001 01:21 AM

q1.How exception is handled by objects?
That is what the object contains?



q2. We know that object is stored in Heap.But in exception handling the
default catch handler prints the error
and also prints the stack trace.I can't understand this.

Re: Exception handling in java

Posted By:   Anonymous  
Posted On:   Wednesday, September 12, 2001 05:41 AM

Hi,


The Java stack is composed of stack frames (or frames). A stack frame contains the state of one Java method invocation.
When a thread invokes a method, the Java virtual machine pushes a new frame onto that thread's Java stack. When the method completes, the virtual machine pops and discards the frame for that method.



For more details check http://www.artima.com/insidejvm/ed2/ch05JavaVirtualMachine2.html



~vivek
About | Sitemap | Contact