Pad a String with Spaces inJava
Since Java 1.5 we can use the
method java.lang.String.format(String
, object) and use printf like format.
The
format string "%1$15s" will
do the job. Where 1$ indicates the
argument index, s indicates that
the argument is a String 15 represent the
minimal...
Pad a String with Spaces in Java
Ashok Veer | June 12, 2020 |
Pad a String with Spaces in Java
Be the first to comment!
read more...
Subscribe to:
Posts (Atom)