How to leave out some System.out/logging statements while executing java code? -


If we do not want to compile some statements in C ++, such as emphasizing function calls, then we Add your collection to # Ifndef preprocessor guidelines.

How do we do this in Java?

I have statements for some system.out.printeline () debugging that I want to remove for the final code.

In a way they have to perform conditional under the influence of Boolean variables, is there a better way of doing this?

I have a Java swing application so I can system out. Output. What's the way to do this?

Use a logging framework such as You can print the console in debugging and leave everything in the product without compiling the application again.


Comments