String Formatting
Most common way of formatting a string in java is using String.format(). If there were a “java sprintf” then this would be it.
For formatted console output, you can use printf() or the format() method of System.out and System.err PrintStreams.
Create a Formatter and link it to a StringBuilder. Output formatted using the format() method will be appended to the StringBuilder.
===========================================================
===========================================================
===========================================================
No comments:
Post a Comment