I’m on a role with customer relations. I’m working my way through Murach’s Java SE 6, and enjoying it thoroughly. At any rate there is a tutorial mentioned in the book that I could not locate on the Murach website. When I wrote asking about it I received the following reply from the author of the book!
Hello Aaron,
Well, it looks like we forgot to post the printf tutorial for the Java SE 6 book to our web site. Thanks for pointing this out. We will fix this as soon as possible.
In the meantime, you can download the printf tutorial for our Java 5 book by going here:
http://www.murach.com/dloads/jav5/Printf_tutorial.pdf
The printf method works the same for Java 5 and 6, so everything in this tutorial should work for Java 6 even though it says Java 5.
Thanks again,
Joel Murach
Mike Murach & Associates
With service like that you can’t help but go back for more.


class Neat {
public static void main ( String[] argv ) {
java.util.Properties props = System.getProperties() ;
String userName = props.getProperty(”user.name”) ;
String osArch = props.getProperty(”os.arch”) ;
String osName = props.getProperty(”os.name”) ;
System.out.printf(”Hi, %s. I hope you like your %s platform running that %s!!\n”,
userName,
osArch,
osName.toUpperCase().indexOf(”WIN”) != -1 ? “crappy ” + osName : “wonderful ” + osName) ;
}
}
Comment by Anthony Martin — August 23, 2007 @ 1:46 pm
Feel free to donate one of Steve’s computers to High Caliber Guns.
Comment by Aaron Jackson — August 23, 2007 @ 2:18 pm