+ 1
What this line do?
System.out.println("%-15s%03d%n",s1,x);
6 ответов
+ 4
The compiler throws an error.
+ 1
The println syntax firstly doesn't allow to make such a formated print. that's the printf syntax.
for exem:
Whith PRINTF
| 1 String name= "Ben";
| 2 System.out.printf("good morning %s ", name);
But with PRINTLN
| 1 String name = "Ben";
| 2 System.out.println("good morning " + name);
So that line will do nothing good
0
Nothing
println should be printf
0
Oh sorry, I mean printf. What are the symbols mean?