I don't know what 'don't use any String format library' means specifically, but... now we get into a semantic argument as to what 'library' means. You're formatting a string. If I take your question on face value you're asking for literally the impossible: How does one format a string without formatting a string?
I'm going to assume you meant: Without adding a third party dependency.
In which case, if you have doubles (or BigDecimal or float) as input:
String.format("%6.2f", 100.00);
String.format("%6.2f", 10.00);
String.format("%6.2f", 5.00);
(6? Yes; 6! The 6 is the total # of characters to print at minimum. You want 3 digits before the separator, a separator, and 2 digits after, that's a grand total of 6, hence the 6.)
If you have strings as input, evidently you are asking to right-justify them? Well, you can do that:
String.format("%6s", "100.00");
String.format("%6s", "10.00");
String.format("%6s", "5.00");
NB: For convenience, System.out.printf("%6s\n", "100.0"); is short for System.out.println(String.format("%6s", "100.0"));
formatmethod)? That would be the obvious path and you'd need a pretty strong argument on why you want to avoid using that.String value = a+ "\n "+ b +"\n " +c;:P