In java, I know it's possible to format words or numbers. An example would be
System.out.printf("%15s\n", word);
Which would format whatever the value of word in a space with size 15.
Somewhere I read it's possible to do the same if you are returning a value, but did not provide any examples of it. I tried:
ovbiusly I'm trying to return "word", can I format it while I return it?
That doesn't work, as I get illegal start of expression as an error.
Thanks