0
Use printf In java
How to use printf function in Java
1 Réponse
+ 1
It's System.out.printf
The formatting for strings is %s, and for newlines it's %n so if you wanna print a string followed by a newline:
String foo = "Hello World";
System.out.printf("%s%n", foo);
Here is a quick reference for printf:
https://www.scribd.com/document/230202987/Java-Printf-Method-Quick-Reference