Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8437333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:24:05+00:00 2026-06-10T07:24:05+00:00

Probably a newbie question, but everyone seems to use e.printStackTrace() , but I have

  • 0

Probably a newbie question, but everyone seems to use e.printStackTrace(), but I have always used System.out.println(e) when exception handling. What is the difference and why is e.printStackTrace() preferable?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:24:07+00:00Added an answer on June 10, 2026 at 7:24 am

    The output stream used is not the same as pointed out by @Brian, but the level of detail is not the same either – you can try with the simple test below. Output:

    With println: you only know what exception has been thrown

    java.lang.UnsupportedOperationException: Not yet implemented

    With printStackTrace: you also know what caused it (line numbers + call stack)

    java.lang.UnsupportedOperationException: Not yet implemented
    at javaapplication27.Test1.test(Test1.java:27)
    at javaapplication27.Test1.main(Test1.java:19)

    public static void main(String[] args){
        try {
            test();
        } catch (UnsupportedOperationException e) {
            System.out.println(e);
            e.printStackTrace();
        }
    }
    
    private static void test() {
        throw new UnsupportedOperationException("Not yet implemented");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Probably a very newbie question but, Ive been reading around and have found some
Probably this is a newbie question :) But I have some Flash games built
This is probably a newbie face-palm question, but I can't figure this out. I'm
While trying out jQuery, I have a question that is probably a newbie mistake,
I'm a bit new to Rails/RSpec/Capybara, so this is probably a newbie question, but
This is probably a really newbie question (well, I'm pretty sure it is), but
I realize this is probably a hopelessly newbie question, but what is the difference
Newbie here with a frustrating, but probably simple question. I am trying to write
This is probably a newbie question, but is it possible to add a sprite
This is probably a newbie question, but I can't seem to think of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.