Better you can copy and paste the code here, rather than paste the link here. I guess the question is,
if you are using JDK 1.4, this will give a compilation error since the printf() method needs an object as the second argument and the primitive variable, f, won't be implicitly convert to an object. In java 5, it will auto box to the object. In java 5, the answer will be, 28000.00.
The %4.2f will format the number to 2 floating digits.