+ 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?

22nd Feb 2021, 4:31 AM
Oliver Pasaribu
Oliver Pasaribu - avatar
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
22nd Feb 2021, 5:25 AM
Ipang
+ 2
printf() does not exist. But System.out.printf() does exist.
22nd Feb 2021, 4:39 AM
你知道規則,我也是
你知道規則,我也是 - avatar
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.
22nd Feb 2021, 4:55 AM
Oliver Pasaribu
Oliver Pasaribu - avatar