Difference between System.out.printf() & println() in Java ?

First of all user has to understand the difference in println and printf. The names are short versions of their function. println is short for "print line", meaning after the argument is printed then goes to the next line. printf is short for print formatter, it gives you the ability to mark where in the String variables will go and pass in those variables with it. This saves from having to do a long String concatenation. Here are a few examples, I will be putting '_' where the computer is left and where it would put stuff if sent another print statement.
Source: provided this answer in stackoverflow link

println statement:
System.out.println("Happy New year 2020!");
Result printed to the User in the console:
Happy New year 2020!
_
printf statement:
String var_year = "2020"

System.out.printf("Happy New year %s!", var_year);
Result printed to the User in the console:
Happy New year 2020!_