Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- System.out.printf("%-4.3f%n",123.45); // left justified, 3 decimal places
- System.out.printf("%,07d%n",2124); // zero-padded with comma delimiter
- System.out.printf("%b", null); // prints false
- Output:
- 123.450
- 002,124
- false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement