Skip to content

Java Debug Output

Since my last several modules have been core enough to merit creating both Java and .Net, I’m getting pretty proficient at translating between the two languages.

Here’s my Java version of my previous article about C# Debug Output.


    private static final boolean DEBUG = true;
    private static void DebugOutput(String message)
    {
        DebugOutput(message, null);
    }

private static void DebugOutput(String message, Object details)
{
    if(DEBUG)
    {
        System.out.println(message + ": " + details.toString());
    }
}