Format a table with Java printf statements

preview_player
Показать описание
Want to bring beauty to your console based Java programs?

Well, it's not possible. They'll never be pretty. But they can be handsome if you create a table with Java printf format functions. Java printf tables always look cool.

In this Java table printf example, we format a table with data about the 8 Java primitive types. We add a header, cell spacing and borders, and every do some zero padding on the digits we use.

If you want to learn how to format a table with printf Java statements, this quick example will show you exactly how to do it.
Рекомендации по теме
Комментарии
Автор

Perfect video. So much help. Thank you!

aaronrodriguez
Автор

This saved my numerical methods java program, thanks!

intifadayuri
Автор

Working on execution measurement and needed to have it in a table, Thanks

destinyamba
Автор

Let's say category is more than one word and the total takes more spaces then %10s, how do I send the exceeding characters or words to another line, without also sending name and bits alongside it

pervertbismarck