I have text file having multiple rows of data.here I want to align all the rows properly.suppose take below scenario.
John. 12345
Steve. 32456
Mike. 62345
Based on above data,32456 and 62345 should align with 12345 properly.I want to do this with java.any clues on this.
Thanks
Chaitu
IF your output is going to be displayed in fixed-width fonts, then you can use the java.util.Formatter class and give each output string a width to line them up. String.format uses the Formatter format syntax:
But you don’t say where your output is going, or whether you are using a fixed-width font, etc., so I can only hope this is what you’re asking.