0

formatted output

Hey guys, do you know how to output sth like this in Java: one two three. 1 2 3 I have used printf, tab, and all tools that I know but it has not worked the way I want.

3rd Dec 2019, 11:13 PM
Khai123
Khai123 - avatar
1 Answer
+ 1
another tip, if you want them left justified, you do this. System.out.printf("%-3d %-3d %-3d",1,2,3);
5th Dec 2019, 12:01 PM
Shen Bapiro
Shen Bapiro - avatar