Tom HawtinThomas Hawtin's WeblogAn old favourite updated- June 17, 2006 Writing a program to print itself to standard output is a pointless task, but that isn't about to stop me. Printing the " character is the key to a concise solution. Various tricks make the program shorter. New in Java 5.0, PrintStream (and StringBuffer) catch up with Writer, by effectively allowing a print to combine with a substringsubSequence. class TstaticString t="+(char)34;System.out.append(t+t+t,44,182);class TstaticString t="+(char)34;System.out.append(t+t+t,44,182); See, tiger really.http://www.jroller.com/tackline/entry/an_old_favourite_updated |