I'm working with a class called Human
where I've defined a year to the Human
class - the years are between 1932 and 2017 - and I would like to use String.format()
to convert 1948
to F48
, where the F
is always in front. Is there an easy way to accomplish this? I've been trying out:
String sf3 = String.format("Value is %10s", 1948);
But it seems only to be adding more whitespace.