What is the purpose of printStackTrace()?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • deepakguddu
    New Member
    • Oct 2007
    • 1

    #1

    What is the purpose of printStackTrace()?

    What is the use of printStackTrace () function in java programming ?
  • pbmods
    Recognized Expert Expert
    • Apr 2007
    • 5821

    #2
    Heya, Deepak. Welcome to TSDN!

    I'm going to go ahead and move this thread to the Java forum, where our resident Experts will be better able to help you out.

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      Originally posted by deepakguddu
      What is the use of printStackTrace () function in java programming ?
      It's a method of the Throwable class. All Exceptions are a subclass of that class.
      The trace prints exactly where the program was at the moment the exception was
      thrown: class and line number (if it could be found). It's a great debugging tool.

      kind regards,

      Jos

      Comment

      Working...