This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I also made a small hack to get some text formatting. I'll put it up on: http://www.fos.su.se/~tompa/JAVA/FormatString.txt so you can check it out. It's a private class like Math, so you invoke it by saying: FormatString.xxxxAdjust( String foo, int bar ) where xxxx = right, left, or middle. foo = the string you wnat to adjust. bar = the number of characters long you want the formatted text to be. Best regards! Tomas
Joined: Jan 29, 2003
For grins, as an optional argument specify what character or string to use for padding. It's cool to put leading zeros or center a string for a heading or eyecatcher: