I looked up the api about the logger class(here) and I was looking at the Logger.info
method. I was confused when I saw its perimeter as a message displayed as
The main difference between a Logger and System.out.println is Logger:
Prints the text in a file(text file)System.out.println:
Prints the output in console
Logger is useful when you are going for any LIVE projects.
Because if any project is developed and deployed, then you cannot check the console. At that time Logger will be useful to track the flow of your project also you can find the Error or Exception if you have given the logger in catch{...} block.
Also go through this Logger vs. System.out.println