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

  • Home
  • SEARCH
  • 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 8377799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:45:51+00:00 2026-06-09T15:45:51+00:00

I am doing a Java application, which will use swing user interface. It will

  • 0

I am doing a Java application, which will use swing user interface. It will ask user to specify some settings, by filling in forms, and then process them and generate some files in the ./output/ directory.

During development process, I’d like to output some technical information in console, using System.out.println() method.

Do I need to remove all these console outputs when I’ll finish development?

If yes, what is the best way to display debug information during development process to easily remove it before production?

Maybe I should use only JUnit tests for debugging purposes? I’ve just started with it, so I have vague idea of ​​its capabilities.

  • 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-09T15:45:52+00:00Added an answer on June 9, 2026 at 3:45 pm

    If you’re not going to use a specialised debugging framework it could be as easy as:

    if (Debugger.isEnabled())
        Debugger.log("message here");
    

    The Debugger class just encapsulates the println calls (like this):

    public class Debugger{
        public static boolean isEnabled(){
            return true;
        }
    
        public static void log(Object o){
            System.out.println(o.toString());
        }
    }
    

    That way when you want to go to production, or you can modify the behavior of your debugging (or disable it) by changing one line in a class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a Java application that will use some Hibernate (annotated by
I'm writing a Java application which requires a number of resource files (there will
I'm creating a new web application which will use a bunch of Data Access
I'm building a Java application which will download a HTML page from a website
Does anyone know if (and how) I can build an application (Java/Ruby/whatever) doing REST
Well I'm doing some Java - C integration, and throught C library werid type
I'm doing some JAVA coding at home and at work. At home i have
I'm interested in doing some Java web development but I'm not really interested in
some code snippets. The java coding doing the jaxb unmarshaling. pretty straightforward, copied out
I want to use google map API for my desktop application. The application will

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.