title: How to run java program in command prompt by outputting results to log file and also to console
body: <p>I have a Java Program which needs to be executed from command line where the output should be printed in console and also to a file(log file).</p>