Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Beginning Java and the fly likes what is a stack trace Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what is a stack trace" Watch "what is a stack trace" New topic
Author

what is a stack trace

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1057

what is a stack trace is it a method in some class???


http://www.lifesbizzare.blogspot.com || OCJP:81%
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24189
    
  34

A stack trace is a listing of the method that's running, and the method that called it, and the method that called that one, etc. It's what you see if have an uncaught exception. You can print one yourself by including a line of code like this:

new Exception().printStackTrace();

It's extremely handy for debugging because it often contains line numbers.


[Jess in Action][AskingGoodQuestions]
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1057

thank you Mr. Ernest Friedman-Hill
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: what is a stack trace