+ 1
Why method printf("%s\n", "This is a string"); cannot displayed as formatted in Java sololearn?
Why method printf("%s\n", "This is a string"); cannot display output as formatted text in Java sololearn?
4 Respuestas
+ 4
Oliver,
System.out.printf(<format>, ...<values>) works just fine in Code Playground.
If you are facing a problem, try to save and share your code link by following the steps below 👇
https://www.sololearn.com/post/75089/?ref=app
+ 2
printf() does not exist.
But System.out.printf() does exist.
0
CarrieForle : the original code indeed System.out.printf. I just want to know is there are changes Made or update from Java about printf for higher or newer Java version? Deitel Java 7th edition use System.out.printf("%s\n", "This string will be displayed"); when cover this printf method.