aspose file tools*
The moose likes Java in General and the fly likes what is difference between call stack and stack tace? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "what is difference between call stack and stack tace?" Watch "what is difference between call stack and stack tace?" New topic
Author

what is difference between call stack and stack tace?

shankara me
Greenhorn

Joined: Nov 30, 2012
Posts: 14
Hi !
My doubt is on call stack and stack trace in java.
Call stack: “The call stack is an internal list of all the methods that are currently executing.”
Stack trace: ”It is a list of all all the methods in call stack.”
According to above definitions Stacktrace contains list of all the methods in call stack.
Then what is the difference between call stack and stack trace?
Please explain the difference.


Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

stack trace is ok, call stack is not that commonly used term

. when you call method, jvm calls stack.

when you call recursion/ method calls other method , jvm calls stack..stack... debugging it called stack trace

some other may be give you good definition .
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

They're more or less the same thing. If I had to make a distinction, I would consider the call stack to be the abstract idea of the current stack of methods being called, and/or the JVM's internal representation of that abstraction; and I'd consider the stack trace to be a textual representation of the call stack, for humans to use for debugging.
Saifuddin Merchant
Ranch Hand

Joined: Feb 08, 2009
Posts: 605

Great answer Jeff, that's really well put. LIKE


Cheers - Sam.
Twisters - The new age Java Quiz || My Blog
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

Cool. Glad you found it useful.
 
wood burning stoves
 
subject: what is difference between call stack and stack tace?