Pad a String with Spaces in Java

Ashok Veer | June 12, 2020 | Be the first to comment!
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...
read more...
 
Copyright © 2019 techfloaters • All Rights Reserved.
Template Design by Ashok Veer ( veersoft solution)