Results 1 to 3 of 3
  1. #1
    simorgh is offline Member
    Join Date
    Jan 2010
    Posts
    25
    Rep Power
    0

    Default printStackTrace()

    I read something about this printStackTrace()?

    May you give me example about this method? How to use the result of this method to find the problem?

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,518
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by simorgh View Post
    I read something about this printStackTrace()?

    May you give me example about this method? How to use the result of this method to find the problem?
    By reading what it wrote?

    kind regards,

    Jos

  3. #3
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,395
    Rep Power
    25

    Default

    Write a small simple program that tries to use an object reference that is null and throws a NPE. Put that code in a
    try{... code here ... }catch(Exception x) {x.printStackTrace();}

    Look at the output that is printed on the screen.

Similar Threads

  1. printStackTrace+error
    By Freddie in forum New To Java
    Replies: 1
    Last Post: 05-31-2007, 05:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •